mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
5.5 merge and fixes for compiler/test errors
This commit is contained in:
47
mysql-test/t/myisam_optimize.test
Normal file
47
mysql-test/t/myisam_optimize.test
Normal file
@@ -0,0 +1,47 @@
|
||||
#
|
||||
# test OPTIMIZE and a concurrent SELECT of a MyISAM table
|
||||
#
|
||||
source include/have_debug_sync.inc;
|
||||
|
||||
call mtr.add_suppression(" marked as crashed and should be repaired");
|
||||
|
||||
create table t1 (a int auto_increment primary key, b text);
|
||||
insert t1 (b) select repeat("A", 100);
|
||||
insert t1 (b) select repeat("B", 200) from t1;
|
||||
insert t1 (b) select repeat("C", 300) from t1;
|
||||
|
||||
delete from t1 where a < 3;
|
||||
explain select a, left(b,10) from t1 order by a;
|
||||
select left(b,10), a from t1 order by a;
|
||||
|
||||
set debug_sync='myisam_before_repair_by_sort wait_for go';
|
||||
send optimize table t1;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state like "%myisam_before_repair_by_sort%";
|
||||
--source include/wait_condition.inc
|
||||
|
||||
send select a, left(b,10) from t1 order by a;
|
||||
|
||||
connect (con2,localhost,root,,);
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Waiting for table metadata lock";
|
||||
--source include/wait_condition.inc
|
||||
|
||||
set debug_sync='now signal go';
|
||||
|
||||
connection default;
|
||||
reap;
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user