Does anyone know if it is possible to add multiple columns at one time using Percona's pt-online-schema-change for MySQL? I have tried literally every variant I can think of in order to add multiple columns at one time. It seems like something you should be able to do, but I cannot find any evidence online that you can, nor can I get the syntax to work out. A few of the statements I've attempted are below, to give you an idea what I've tried (username and password edited out, for obvious reasons)
Statement 1:
pt-online-schema-change --print --progress time,5 --max-load Threads_running=1000
--critical-load Threads_running=10000 --chunk-time 5 --set-vars "innodb_lock_wait_timeout=600"
--nocheck-plan --execute -h webdb -u xxxx --p xxxx --alter "ADD first_seen datetime NOT NULL
DEFAULT 0, last_seen datetime NOT NULL DEFAULT 0 AFTER days_running" D=mydata,t=mytable
Statement 2:
pt-online-schema-change --print --progress time,5 --max-load Threads_running=1000
--critical-load Threads_running=10000 --chunk-time 5 --set-vars "innodb_lock_wait_timeout=600"
--nocheck-plan --execute -h webdb -u xxxx --p xxxx --alter "ADD first_seen datetime NOT NULL
DEFAULT 0, ADD last_seen datetime NOT NULL DEFAULT 0 AFTER days_running" D=mydata,t=mytable
Statement 3:
pt-online-schema-change --print --progress time,5 --max-load Threads_running=1000
--critical-load Threads_running=10000 --chunk-time 5 --set-vars "innodb_lock_wait_timeout=600"
--nocheck-plan --execute -h webdb -u xxxx --p xxxx --alter "ADD first_seen datetime NOT NULL
DEFAULT 0 AFTER days_running, ADD last_seen datetime NOT NULL DEFAULT 0 AFTER days_running"
D=mydata,t=mytable
And so forth. Basically I've tried every variant I can think of for ADD first_seen datetime NOT NULL
DEFAULT 0, ADD last_seen datetime NOT NULL DEFAULT 0 AFTER days_running" (moving/removing the after, moving/removing the ADD, moving/removing the comma, etc)