# pt-online-schema-change stops with EXPLAIN statement error in Percona Toolkit 2.2.17

**URL:** <https://forums.percona.com/t/pt-online-schema-change-stops-with-explain-statement-error-in-percona-toolkit-2-2-17/5318>\
**Category:** Percona Toolkit\
**Created:** [December 22, 2016, 2:55pm UTC](https://forums.percona.com/t/pt-online-schema-change-stops-with-explain-statement-error-in-percona-toolkit-2-2-17/5318 "2016-12-22T14:55:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sps0511](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sps0511](https://forums.percona.com/u/sps0511)\
**Post date:** [December 22, 2016, 2:55pm UTC](https://forums.percona.com/t/pt-online-schema-change-stops-with-explain-statement-error-in-percona-toolkit-2-2-17/5318/1 "2016-12-22T14:55:46Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![sps0511](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sps0511](https://forums.percona.com/u/sps0511)\
**Post date:** [December 22, 2016, 5:30pm UTC](https://forums.percona.com/t/pt-online-schema-change-stops-with-explain-statement-error-in-percona-toolkit-2-2-17/5318/2 "2016-12-22T17:30:03Z")

</div>

What I think is happening here is that its not able to get the values in the placeholders ‘?’, due to which the statements contain ‘?’ which gives a syntax error. What could be the reason for the tool not taking the values into the queries ? Is any configuration missing ?
