summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_many_optimize.test
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-01-10 15:13:33 +0100
committerunknown <guilhem@mysql.com>2005-01-10 15:13:33 +0100
commit5ff3c59a5c52494242558cd812e72007459ddee4 (patch)
treea1113d378892d6cb081b001fa10c159e831ce9f0 /mysql-test/t/rpl_many_optimize.test
parent1300c0691c57d52dc0bb79c3fab6a86d3e7a340b (diff)
downloadmariadb-git-5ff3c59a5c52494242558cd812e72007459ddee4.tar.gz
A test for the BUG#7658 just fixed in 4.0 (could not put it into 4.0 as in 4.0 we don't replicate OPTIMIZE TABLE).
Diffstat (limited to 'mysql-test/t/rpl_many_optimize.test')
-rw-r--r--mysql-test/t/rpl_many_optimize.test20
1 files changed, 20 insertions, 0 deletions
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;