Hi,
The following details are from Jira PT-1512, just wondered if anyone else had seen this issue, or might spot if I’m doing this wrong.
Thanks,
Mike
Details
We are testing the use of pt-online-schema-change to move a 15 GB table in the near future.
I created a copy of a small table on one of our dev boxes, as follows
[root@localhost mysql]# ls -ltrh camspatial1/curation_automated_group_routes*
rw-rr-. 1 mysql mysql 8.5K Mar 8 15:08 camspatial1/curation_automated_group_routes.frm
rw-rr-. 1 mysql mysql 6.3M Mar 8 15:17 camspatial1/curation_automated_group_routes.MYI
rw-rr-. 1 mysql mysql 5.1M Mar 8 15:17 camspatial1/curation_automated_group_routes.MYD
CREATE TABLE ms_curation_automated_group_routes LIKE curation_automated_group_routes;
ALTER TABLE ms_curation_automated_group_routes DISABLE KEYS;
INSERT INTO ms_curation_automated_group_routes SELECT * FROM curation_automated_group_routes;
ALTER TABLE ms_curation_automated_group_routes ENABLE KEYS;
I then ran the following command, this failed, I them updated the toolkit to 3.0.8-1, running on 5.7.21-20, and it failed again.
[root@localhost mysql]# pt-online-schema-change --data-dir=“/viewranger/data/mysql_old” --execute D=camspatial1,t=ms_curation_automated_group_routes -u root -p;
No slaves found. See --recursion-method if host localhost.localdomain has slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
Operation, tries, wait:
analyze_table, 10, 1
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_foreign_keys, 10, 1
Altering camspatial1
.ms_curation_automated_group_routes
…
Creating new table…
Created new table camspatial1._ms_curation_automated_group_routes_new OK.
2018-03-23T16:57:15 Creating triggers…
2018-03-23T16:57:16 Created triggers OK.
2018-03-23T16:57:16 Copying approximately 133481 rows…
2018-03-23T16:57:17 Copied rows OK.
2018-03-23T16:57:17 Analyzing new table…
2018-03-23T16:57:17 Swapping tables…
2018-03-23T16:57:17 Swapped original and new tables OK.
2018-03-23T16:57:17 Dropping old table…
2018-03-23T16:57:17 Dropped old table camspatial1
._ms_curation_automated_group_routes_old
OK.
2018-03-23T16:57:17 Dropping triggers…
2018-03-23T16:57:17 Dropped triggers OK.
Successfully altered camspatial1
.ms_curation_automated_group_routes
.
[root@localhost mysql]# pwd
/viewranger/data/mysql
[root@localhost mysql]# ls -ltrh camspatial1/ms*
rw-r----. 1 mysql mysql 8.5K Mar 23 16:57 camspatial1/ms_curation_automated_group_routes.frm
rw-r----. 1 mysql mysql 2.6M Mar 23 16:57 camspatial1/ms_curation_automated_group_routes.MYD
rw-r----. 1 mysql mysql 2.8M Mar 23 16:57 camspatial1/ms_curation_automated_group_routes.MYI
Tables are still in the old directory.
Am I, as they say, doing it wrong ?
Mike