Hi All,
I’m using mysql 5.5.24 and percona-toolkit-2.1.2 version on linux platform.
Please correct me, if i’m wrong - As far as i know, we can make online schema change while the app is running using pt-online-schema-change tool.
However, i just execute one test case manually from command prompt and it got hanged.
Session-1:
mysql> select * from test;
±–±–+
| i | p |
±–±–+
| 3 | |
| 4 | |
±–±–+
2 rows in set (0.00 sec)
Session-2:
[mysql@obsidian bin]$ ./pt-online-schema-change --user=root --password=passwd --execute --alter=“add column v varchar(100) not null default ‘’” D=gaurav,t=test
Altering gaurav
.test
…
Creating new table…
Created new table gaurav._test_new OK.
Altering new table…
Altered gaurav
._test_new
OK.
Creating triggers…
Session-1:
mysql> show processlist;
…
| 10693 | root | localhost | gaurav | Query | 21 | Waiting for table metadata lock | CREATE TRIGGER pt_osc_gaurav_test_del
AFTER DELETE ON gaurav
.test
FOR EACH ROW DELETE IGNORE FRO |
…
So, i need to release lock using COMMIT/ROLLBACK.
Plz guide - what wrong i’m doing here or what is exact use this tool.
Thanks.