diff options
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r-- | mysql-test/suite/vcol/inc/vcol_select.inc | 2 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/update.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/update_binlog.result | 8 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_keys_myisam.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_misc.result | 28 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_select_innodb.result | 16 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_select_myisam.result | 32 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/wrong_arena.result | 28 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/update.test | 4 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_keys_myisam.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_misc.test | 27 |
11 files changed, 96 insertions, 58 deletions
diff --git a/mysql-test/suite/vcol/inc/vcol_select.inc b/mysql-test/suite/vcol/inc/vcol_select.inc index 0641e14564a..cbd1f2cdd26 100644 --- a/mysql-test/suite/vcol/inc/vcol_select.inc +++ b/mysql-test/suite/vcol/inc/vcol_select.inc @@ -35,7 +35,7 @@ insert into t2 (a) values (1); create table t3 (a int primary key, b int as (-a), c int as (-a) persistent unique); -insert into t3 (a) values (2),(1),(3); +insert into t3 (a) values (2),(1),(3),(5),(4),(7); --echo # select_type=SIMPLE, type=system diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result index 2576859b00b..5a1caaeb5eb 100644 --- a/mysql-test/suite/vcol/r/update.result +++ b/mysql-test/suite/vcol/r/update.result @@ -122,7 +122,7 @@ select * from t; a b c d e 10 5 5 5 5 replace delayed t (a,b,d) values (10,6,6); -flush tables; +flush tables t; check table t; Table Op Msg_type Msg_text test.t check status OK @@ -130,7 +130,7 @@ select * from t; a b c d e 10 6 6 6 6 insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7; -flush tables; +flush tables t; check table t; Table Op Msg_type Msg_text test.t check status OK diff --git a/mysql-test/suite/vcol/r/update_binlog.result b/mysql-test/suite/vcol/r/update_binlog.result index 9a22005f062..828452bf084 100644 --- a/mysql-test/suite/vcol/r/update_binlog.result +++ b/mysql-test/suite/vcol/r/update_binlog.result @@ -124,7 +124,7 @@ select * from t; a b c d e 10 5 5 5 5 replace delayed t (a,b,d) values (10,6,6); -flush tables; +flush tables t; check table t; Table Op Msg_type Msg_text test.t check status OK @@ -132,7 +132,7 @@ select * from t; a b c d e 10 6 6 6 6 insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7; -flush tables; +flush tables t; check table t; Table Op Msg_type Msg_text test.t check status OK @@ -304,7 +304,7 @@ select * from t; a b c d e 10 5 5 5 5 replace delayed t (a,b,d) values (10,6,6); -flush tables; +flush tables t; check table t; Table Op Msg_type Msg_text test.t check status OK @@ -312,7 +312,7 @@ select * from t; a b c d e 10 6 6 6 6 insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7; -flush tables; +flush tables t; check table t; Table Op Msg_type Msg_text test.t check status OK diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result index b7086600ab1..9400127211c 100644 --- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result @@ -277,6 +277,7 @@ a b c d delete from t1 where b=12; analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment @@ -389,7 +390,7 @@ drop table t1; CREATE TABLE t1 (i INT, d1 DATE, d2 DATE NOT NULL, t TIMESTAMP, KEY(t)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,'2023-03-16','2023-03-15','2012-12-12 12:12:12'); ALTER TABLE t1 MODIFY t FLOAT AS (i) PERSISTENT; -SELECT i, d1, d2 FROM t1 INTO OUTFILE 'load_t1'; +SELECT i, d1, d2 INTO OUTFILE 'load_t1' FROM t1; DELETE FROM t1; LOAD DATA INFILE 'load_t1' INTO TABLE t1 (i,d1,d2); SELECT * FROM t1 WHERE d2 < d1; diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 1dd2c3ea5af..6afdd120d26 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -182,16 +182,36 @@ a b c 2 3 y 0 1 y,n drop table t1,t2; -CREATE TABLE t1 ( +SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug; +SET GLOBAL debug_dbug= "+d,write_delay_wakeup"; +CREATE TABLE t1 (a int, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL ) ENGINE=MyISAM; -INSERT INTO t1 (tsv) VALUES (DEFAULT); -INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT); +# First test FLUSH TABLES +INSERT INTO t1 (a,tsv) VALUES (1,DEFAULT); +INSERT DELAYED INTO t1 (a,tsv) VALUES (2,DEFAULT); FLUSH TABLES; +SELECT COUNT(*) > 0 FROM t1; +COUNT(*) > 0 +1 +# Then test FLUSH TABLES t1; +INSERT INTO t1 (a,tsv) VALUES (3,DEFAULT); +INSERT DELAYED INTO t1 (a,tsv) VALUES (4,DEFAULT); +FLUSH TABLES t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +# Then test FLUSH TABLES WITH READ LOCK; +INSERT INTO t1 (a,tsv) VALUES (5,DEFAULT); +INSERT DELAYED INTO t1 (a,tsv) VALUES (6,DEFAULT); +FLUSH TABLES WITH READ LOCK; SELECT COUNT(*) FROM t1; COUNT(*) -2 +6 +set GLOBAL debug_dbug= @old_debug; +unlock tables; DROP TABLE t1; # # MDEV-4823 Server crashes in Item_func_not::fix_fields on diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result index 63c35bade07..6ebdd87029b 100644 --- a/mysql-test/suite/vcol/r/vcol_select_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result @@ -9,7 +9,7 @@ insert into t2 (a) values (1); create table t3 (a int primary key, b int as (-a), c int as (-a) persistent unique); -insert into t3 (a) values (2),(1),(3); +insert into t3 (a) values (2),(1),(3),(5),(4),(7); # select_type=SIMPLE, type=system select * from t2; a b c @@ -63,8 +63,8 @@ a b c 3 -3 -3 explain select * from t1 where b in (select c from t3); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 index c c 5 NULL 3 Using index -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY t3 ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -73,7 +73,7 @@ a b c 1 -1 -1 explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index +1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index 1 PRIMARY t1 ALL c NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> @@ -160,7 +160,7 @@ a b c 2 -2 -2 explain select * from t3 where b between -2 and -1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where # SELECT * FROM tbl_name WHERE <indexed vcol expr> select * from t3 where c between -2 and -1; a b c @@ -192,7 +192,7 @@ a b c 2 -2 -2 explain select * from t3 where b between -2 and -1 order by a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index NULL PRIMARY 4 NULL 3 Using where +1 SIMPLE t3 index NULL PRIMARY 4 NULL 6 Using where # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where b between -2 and -1 order by b; a b c @@ -200,7 +200,7 @@ a b c 1 -1 -1 explain select * from t3 where b between -2 and -1 order by b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where c between -2 and -1 order by b; a b c @@ -216,7 +216,7 @@ a b c 1 -1 -1 explain select * from t3 where b between -2 and -1 order by c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where c between -2 and -1 order by c; a b c diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result index d6a8babc045..05c68e5d893 100644 --- a/mysql-test/suite/vcol/r/vcol_select_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result @@ -9,7 +9,7 @@ insert into t2 (a) values (1); create table t3 (a int primary key, b int as (-a), c int as (-a) persistent unique); -insert into t3 (a) values (2),(1),(3); +insert into t3 (a) values (2),(1),(3),(5),(4),(7); # select_type=SIMPLE, type=system select * from t2; a b c @@ -44,7 +44,7 @@ a b c 1 -1 -1 explain select * from t3 where c>=-1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +1 SIMPLE t3 range c c 5 NULL 1 Using index condition # select_type=SIMPLE, type=ref select * from t1,t3 where t1.c=t3.c and t3.c=-1; a b c a b c @@ -63,8 +63,8 @@ a b c 3 -3 -3 explain select * from t1 where b in (select c from t3); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 index c c 5 NULL 3 Using index -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY t3 ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -73,8 +73,8 @@ a b c 1 -1 -1 explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index -1 PRIMARY t1 ref c c 5 test.t3.c 2 +1 PRIMARY t1 range c c 5 NULL 3 Using index condition +1 PRIMARY t3 ref c c 5 test.t1.c 1 Using index # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -152,7 +152,7 @@ a b c 2 -2 -2 explain select * from t3 where a between 1 and 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition +1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> select * from t3 where b between -2 and -1; a b c @@ -160,7 +160,7 @@ a b c 1 -1 -1 explain select * from t3 where b between -2 and -1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where # SELECT * FROM tbl_name WHERE <indexed vcol expr> select * from t3 where c between -2 and -1; a b c @@ -168,7 +168,7 @@ a b c 1 -1 -1 explain select * from t3 where c between -2 and -1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition +1 SIMPLE t3 range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <indexed vcol> select * from t3 where a between 1 and 2 order by c; a b c @@ -176,7 +176,7 @@ a b c 1 -1 -1 explain select * from t3 where a between 1 and 2 order by c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Using filesort +1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-vcol> select * from t3 where b between -2 and -1 order by a; a b c @@ -184,7 +184,7 @@ a b c 2 -2 -2 explain select * from t3 where b between -2 and -1 order by a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-vcol> select * from t3 where c between -2 and -1 order by a; a b c @@ -192,7 +192,7 @@ a b c 2 -2 -2 explain select * from t3 where c between -2 and -1 order by a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Using filesort +1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where b between -2 and -1 order by b; a b c @@ -200,7 +200,7 @@ a b c 1 -1 -1 explain select * from t3 where b between -2 and -1 order by b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where c between -2 and -1 order by b; a b c @@ -208,7 +208,7 @@ a b c 1 -1 -1 explain select * from t3 where c between -2 and -1 order by b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Using filesort +1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where b between -2 and -1 order by c; a b c @@ -216,7 +216,7 @@ a b c 1 -1 -1 explain select * from t3 where b between -2 and -1 order by c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where c between -2 and -1 order by c; a b c @@ -224,7 +224,7 @@ a b c 1 -1 -1 explain select * from t3 where c between -2 and -1 order by c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition +1 SIMPLE t3 range c c 5 NULL 2 Using index condition # SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol> select sum(b) from t1 group by b; sum(b) diff --git a/mysql-test/suite/vcol/r/wrong_arena.result b/mysql-test/suite/vcol/r/wrong_arena.result index c105a069b7f..cd36801f601 100644 --- a/mysql-test/suite/vcol/r/wrong_arena.result +++ b/mysql-test/suite/vcol/r/wrong_arena.result @@ -7,9 +7,9 @@ d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators() ); Warnings: -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '2' -Warning 1292 Incorrect datetime value: '3' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' +Warning 1292 Truncated incorrect datetime value: '3' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -20,21 +20,21 @@ t1 CREATE TABLE `t1` ( `e` int(11) GENERATED ALWAYS AS ((`a`,1) in ((1,1),(2,1),(NULL,1))) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Warnings: -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '2' -Warning 1292 Incorrect datetime value: '3' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' +Warning 1292 Truncated incorrect datetime value: '3' connect con1, localhost, root; insert t1 (a) values ('2010-10-10 10:10:10'); select * from t1; a b c d e 2010-10-10 10:10:10 1 0 0 NULL Warnings: -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '2' -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '2' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' disconnect con1; connection default; select * from t1; @@ -50,14 +50,14 @@ select * from t1; a b 2010-10-10 10:10:10 0000-00-00 00:00:00 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' disconnect con1; connection default; select * from t1; a b 2010-10-10 10:10:10 0000-00-00 00:00:00 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' drop table t1; create table t1 ( id int not null , diff --git a/mysql-test/suite/vcol/t/update.test b/mysql-test/suite/vcol/t/update.test index 53189ee3219..e1351986968 100644 --- a/mysql-test/suite/vcol/t/update.test +++ b/mysql-test/suite/vcol/t/update.test @@ -93,10 +93,10 @@ check table t; select * from t; insert t(a,b,d) select 10,4,4 on duplicate key update b=5, d=5; check table t; select * from t; replace delayed t (a,b,d) values (10,6,6); -flush tables; +flush tables t; check table t; select * from t; insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7; -flush tables; +flush tables t; check table t; select * from t; --write_file $MYSQLTEST_VARDIR/tmp/vblobs.txt 10 8 foo 8 foo diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test index 99b1c9a444b..86fb8aecbe2 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test @@ -281,7 +281,7 @@ drop table t1; CREATE TABLE t1 (i INT, d1 DATE, d2 DATE NOT NULL, t TIMESTAMP, KEY(t)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,'2023-03-16','2023-03-15','2012-12-12 12:12:12'); ALTER TABLE t1 MODIFY t FLOAT AS (i) PERSISTENT; -SELECT i, d1, d2 FROM t1 INTO OUTFILE 'load_t1'; +SELECT i, d1, d2 INTO OUTFILE 'load_t1' FROM t1; DELETE FROM t1; LOAD DATA INFILE 'load_t1' INTO TABLE t1 (i,d1,d2); SELECT * FROM t1 WHERE d2 < d1; diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index 1de2827efe6..39f4f4142e6 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -1,4 +1,5 @@ --source include/have_ucs2.inc +--source include/have_debug.inc let $MYSQLD_DATADIR= `select @@datadir`; @@ -184,19 +185,35 @@ drop table t1,t2; # Bug mdev-3938: INSERT DELAYED for a table with virtual columns # -CREATE TABLE t1 ( +SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug; +SET GLOBAL debug_dbug= "+d,write_delay_wakeup"; +CREATE TABLE t1 (a int, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL ) ENGINE=MyISAM; -INSERT INTO t1 (tsv) VALUES (DEFAULT); - -INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT); - +--echo # First test FLUSH TABLES +INSERT INTO t1 (a,tsv) VALUES (1,DEFAULT); +INSERT DELAYED INTO t1 (a,tsv) VALUES (2,DEFAULT); FLUSH TABLES; +# Count may be 1 or 2, depending on FLUSH happened before or after delayed +SELECT COUNT(*) > 0 FROM t1; +--echo # Then test FLUSH TABLES t1; +INSERT INTO t1 (a,tsv) VALUES (3,DEFAULT); +INSERT DELAYED INTO t1 (a,tsv) VALUES (4,DEFAULT); +FLUSH TABLES t1; SELECT COUNT(*) FROM t1; +--echo # Then test FLUSH TABLES WITH READ LOCK; + +INSERT INTO t1 (a,tsv) VALUES (5,DEFAULT); +INSERT DELAYED INTO t1 (a,tsv) VALUES (6,DEFAULT); +FLUSH TABLES WITH READ LOCK; +SELECT COUNT(*) FROM t1; +set GLOBAL debug_dbug= @old_debug; +unlock tables; DROP TABLE t1; --echo # |