1include/master-slave.inc 2Warnings: 3Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. 4Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 5[connection master] 6create table t (i int primary key auto_increment) engine=rocksdb partition by key (i) partitions 3; 7# 8# Testing concurrent transactions. 9# 10begin; 11insert into t values (); 12begin; 13insert into t values (); 14begin; 15insert into t values (); 16insert into t values (); 17insert into t values (); 18insert into t values (); 19commit; 20rollback; 21commit; 22delete from t; 23# Master value before restart 24select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 25table_schema table_name auto_increment 26test t 7 27# Slave value before restart 28select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 29table_schema table_name auto_increment 30test t 6 31include/stop_slave.inc 32include/rpl_restart_server.inc [server_number=1] 33# Master value after restart 34select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 35table_schema table_name auto_increment 36test t 6 37include/rpl_restart_server.inc [server_number=2] 38include/start_slave.inc 39# Slave value after restart 40select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 41table_schema table_name auto_increment 42test t 6 43# 44# Testing interaction of merge markers with various DDL statements. 45# 46include/stop_slave.inc 47# Drop and add primary key. 48alter table t modify i int; 49alter table t drop primary key; 50alter table t add primary key (i); 51alter table t modify i int auto_increment; 52include/rpl_restart_server.inc [server_number=1] 53select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 54table_schema table_name auto_increment 55test t 1 56# Remove auto_increment property. 57alter table t modify i int; 58include/rpl_restart_server.inc [server_number=1] 59select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 60table_schema table_name auto_increment 61test t NULL 62# Add auto_increment property. 63insert into t values (123); 64alter table t modify i int auto_increment; 65include/rpl_restart_server.inc [server_number=1] 66select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 67table_schema table_name auto_increment 68test t 124 69# Add column j. 70alter table t add column j int; 71include/rpl_restart_server.inc [server_number=1] 72select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 73table_schema table_name auto_increment 74test t 124 75# Rename tables. 76rename table t to t2; 77rename table t2 to t; 78include/rpl_restart_server.inc [server_number=1] 79select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 80table_schema table_name auto_increment 81test t 124 82# Change auto_increment property 83alter table t auto_increment = 1000; 84include/rpl_restart_server.inc [server_number=1] 85select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 86table_schema table_name auto_increment 87test t 1000 88alter table t auto_increment = 1; 89include/rpl_restart_server.inc [server_number=1] 90select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 91table_schema table_name auto_increment 92test t 124 93alter table t drop primary key, add key (i), auto_increment = 1; 94include/rpl_restart_server.inc [server_number=1] 95select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 96table_schema table_name auto_increment 97test t 124 98alter table t add key (j), auto_increment = 1; 99include/rpl_restart_server.inc [server_number=1] 100select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 101table_schema table_name auto_increment 102test t 124 103alter table t modify i int; 104alter table t add column (k int auto_increment), add key(k), auto_increment=15; 105include/rpl_restart_server.inc [server_number=1] 106select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't'; 107table_schema table_name auto_increment 108test t 16 109# Drop table. 110drop table t; 111include/rpl_restart_server.inc [server_number=1] 112include/start_slave.inc 113include/rpl_end.inc 114