103 lines
2.4 KiB
Plaintext
103 lines
2.4 KiB
Plaintext
--source suite/xengine/include/have_xengine.inc
|
|
--source include/have_debug_sync.inc
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
DROP TABLE IF EXISTS t2;
|
|
DROP TABLE IF EXISTS t3;
|
|
DROP TABLE IF EXISTS t4;
|
|
DROP TABLE IF EXISTS t5;
|
|
--enable_warnings
|
|
|
|
# Start from clean slate
|
|
#--source include/restart_mysqld.inc
|
|
#--exec truncate --size=0 $MYSQLTEST_VARDIR/log/mysqld.1.err
|
|
|
|
CREATE TABLE t1 (
|
|
a int not null,
|
|
b int not null,
|
|
primary key (a,b) comment 'cf1',
|
|
key (b) comment 'cf2'
|
|
) ENGINE=XEngine;
|
|
|
|
CREATE TABLE t2 (
|
|
a int not null,
|
|
b int not null,
|
|
primary key (a,b) comment 'cf1',
|
|
key (b) comment 'cf2'
|
|
) ENGINE=XEngine;
|
|
|
|
CREATE TABLE t3 (
|
|
a int not null,
|
|
b int not null,
|
|
primary key (a,b) comment 'cf1',
|
|
key (b) comment 'cf2'
|
|
) ENGINE=XEngine;
|
|
|
|
CREATE TABLE t4 (
|
|
a int not null,
|
|
b int not null,
|
|
primary key (a,b) comment 'cf1',
|
|
key (b) comment 'cf2'
|
|
) ENGINE=XEngine;
|
|
|
|
# Populate tables
|
|
let $max = 1000;
|
|
let $table = t1;
|
|
--source drop_table_repopulate_table.inc
|
|
let $table = t2;
|
|
--source drop_table_repopulate_table.inc
|
|
let $table = t3;
|
|
--source drop_table_repopulate_table.inc
|
|
let $table = t4;
|
|
--source drop_table_repopulate_table.inc
|
|
|
|
|
|
# Restart the server before t2's indices are deleted
|
|
--source include/restart_mysqld.inc
|
|
|
|
let $table = t1;
|
|
--source drop_table_repopulate_table.inc
|
|
let $table = t4;
|
|
--source drop_table_repopulate_table.inc
|
|
|
|
|
|
# Insert enough data to trigger compactions that eliminate t2 and t3
|
|
let $max = 20000;
|
|
let $table = t1;
|
|
--source drop_table_repopulate_table.inc
|
|
let $table = t4;
|
|
--source drop_table_repopulate_table.inc
|
|
|
|
# Restart the server before t4's indices are deleted
|
|
--source include/restart_mysqld.inc
|
|
|
|
# Make sure new table gets unique indices
|
|
CREATE TABLE t5 (
|
|
a int not null,
|
|
b int not null,
|
|
primary key (a,b) comment 'cf1',
|
|
key (b) comment 'cf2'
|
|
) ENGINE=XEngine;
|
|
|
|
let $max = 1000;
|
|
let $table = t5;
|
|
--source drop_table_repopulate_table.inc
|
|
|
|
drop table t1;
|
|
drop table t2;
|
|
drop table t3;
|
|
drop table t4;
|
|
drop table t5;
|
|
|
|
--connection default
|
|
#let $show_rpl_debug_info= 1; # to force post-failure printout
|
|
let $wait_timeout= 100; # Override default 30 seconds with 100.
|
|
let $wait_condition = select count(*) = 0
|
|
as c from information_schema.xengine_global_info
|
|
where TYPE = 'DDL_DROP_INDEX_ONGOING';
|
|
--source include/wait_condition.inc
|
|
|
|
# Cleanup
|
|
--source suite/xengine/include/check_xengine_log_error.inc
|