diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/rpl_many_optimize.result | 9 | ||||
-rw-r--r-- | mysql-test/t/rpl_many_optimize.test | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_many_optimize.result b/mysql-test/r/rpl_many_optimize.result new file mode 100644 index 00000000000..b2148892591 --- /dev/null +++ b/mysql-test/r/rpl_many_optimize.result @@ -0,0 +1,9 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +drop table t1; diff --git a/mysql-test/t/rpl_many_optimize.test b/mysql-test/t/rpl_many_optimize.test new file mode 100644 index 00000000000..525e23abe15 --- /dev/null +++ b/mysql-test/t/rpl_many_optimize.test @@ -0,0 +1,20 @@ +# Test for BUG#7658 "optimize crashes slave thread (1 in 1000)]" + +source include/master-slave.inc; + +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +# Now many OPTIMIZE to test if we crash (BUG#7658) +let $1=300; +disable_query_log; +disable_result_log; +while ($1) +{ + eval OPTIMIZE TABLE t1; + dec $1; +} +enable_result_log; +enable_query_log; +drop table t1; +# Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE) +sync_slave_with_master; |