I want to alter the Primary key of a table using pt-online-schema change tool on MySQL 5.5 Master DB. I tested out two different versions of Percona. Version 2.1.0 worked correctly and changed the schema of the table. However, 2.2.17 does not work, and gives me this error:
2016-12-22T20:06:33 Error copying rows from management
.table1
to management
._table1_new
: Error executing EXPLAIN SELECT /*!40001 SQL_NO_CACHE / column1
, column1
, column2
, column1
, column2
, column3
FROM management
.table1
FORCE INDEX(PRIMARY
) WHERE ((column1
> ?) OR (column1
= ? AND column2
> ?) OR (column1
= ? AND column2
= ? AND column3
>= ?)) ORDER BY column1
, column2
, column3
LIMIT ?, 2 /next chunk boundary/: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘999’, 2 /next chunk boundary/’ at line 1 [for Statement "EXPLAIN SELECT /!40001 SQL_NO_CACHE */ column1
, column1
, column2
, column1
, column2
, column3
FROM management
.table1
FORCE INDEX(PRIMARY
) WHERE ((column1
> ?) OR (column1
= ? AND column2
> ?) OR (column1
= ? AND column2
= ? AND column3
>= ?)) ORDER BY column1
, column2
, column3
LIMIT ?, 2 /next chunk boundary/"] at PerconaToolkit2.2.17/bin/pt-online-schema-change line 10883, line 1.
The command I am using to test is:
PerconaToolkit2.2.17/bin/pt-online-schema-change --ask-pass --host=localhost --port=8895 --socket=/Database1/mysql/state/mysql.sock --user=root --print --progress=percentage,1 --execute --nocheck-alter --alter “DROP PRIMARY KEY, ADD PRIMARY KEY (column1, column2, column3, column4)” D=management,t=table1
Can you help me out to check whats the issue here ?