mirror of
https://github.com/MariaDB/server.git
synced 2025-07-26 07:02:12 +03:00
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
65 lines
2.1 KiB
Plaintext
65 lines
2.1 KiB
Plaintext
# 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
|
|
# Slow test, don't run during staging part
|
|
-- source include/not_staging.inc
|
|
-- source include/master-slave.inc
|
|
|
|
--disable_warnings
|
|
drop tables if exists t1;
|
|
--enable_warnings
|
|
|
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
|
|
|
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
|
|
--disable_warnings
|
|
update t1 set b=(a/2*rand());
|
|
delete from t1 order by b limit 10000;
|
|
--enable_warnings
|
|
|
|
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;
|
|
sync_slave_with_master;
|
|
|
|
# If the machine is so fast that slave syncs before OPTIMIZE
|
|
# starts, this test will demonstrate nothing but will pass.
|
|
|
|
# End of 4.1 tests
|
|
--source include/rpl_end.inc
|