mariadb/mysql-test/t/rpl_optimize.test
unknown 5e11016e87 Updated test cases
mysql-test/include/not_ndb_default.inc:
  New include file to skip certain tests with default engine = ndb
mysql-test/t/rpl_optimize.test:
  Updated to skip test when NDB is default engine
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Updated to skip test when NDB is default engine
BitKeeper/deleted/.del-rpl_ndb_auto_inc-master.opt~e38255d94debc2c8:
  Delete: mysql-test/t/rpl_ndb_auto_inc-master.opt
mysql-test/t/rpl_ndb_auto_inc.test:
  updated to use with ndb
mysql-test/r/rpl_ndb_auto_inc.result:
  New results
mysql-test/t/disabled.def:
  Updated to remove rpl_ndb_auto_inc.test
mysql-test/extra/rpl_tests/rpl_row_blob.test:
  updated to remove check table, not needed and not supported by ndb engine
mysql-test/t/rpl_ndb_blob2.test:
  new ndb wrapper
mysql-test/r/rpl_ndb_blob2.result:
  new results
2006-02-13 16:36:11 +01:00

54 lines
1.8 KiB
Text

# Test for BUG#1858 "OPTIMIZE TABLE done by a client
# thread stops the slave SQL thread".
# You can replace OPTIMIZE by REPAIR.
#####################################
# Change Author: JBM
# Change Date: 2006-02-09
# Change: NDB does not and will not support
# OPTIMIZE for memory tables. If and when
# it does support for Disk Data, a new
# version of this test will be need.
# Skipping this test if default engine = ndb
#####################################
-- source include/not_ndb_default.inc
-- 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),(3),(4),(5),(6),(7),(8),(9),(10);
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
save_master_pos;
# a few updates to force OPTIMIZE to do something
update t1 set b=(a/2*rand());
delete from t1 order by b limit 10000;
connection slave;
sync_with_master;
optimize table t1;
connection master;
save_master_pos;
connection slave;
# Bug was that when the INSERT terminated on slave,
# the slave SQL thread got killed by OPTIMIZE.
sync_with_master; # won't work if slave SQL thread stopped
connection master; # cleanup
drop table t1;
connection slave;
sync_with_master;
# If the machine is so fast that slave syncs before OPTIMIZE
# starts, this test wil demonstrate nothing but will pass.
# End of 4.1 tests