diff options
author | Igor Babaev <igor@askmonty.org> | 2019-02-03 18:41:18 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-02-03 18:41:18 -0800 |
commit | 37deed3f37561f264f65e162146bbc2ad35fb1a2 (patch) | |
tree | c1cfb6c0995bfcc4ac3fb335f518a8b404413e32 /mysql-test/suite/vcol/t | |
parent | 658128af43b4d7c6db445164f8ed25ed4d1e3109 (diff) | |
parent | 5b996782be6b752ce50a0ecaa222b0688aa9e75d (diff) | |
download | mariadb-git-37deed3f37561f264f65e162146bbc2ad35fb1a2.tar.gz |
Merge branch '10.4' into bb-10.4-mdev16188
Diffstat (limited to 'mysql-test/suite/vcol/t')
-rw-r--r-- | mysql-test/suite/vcol/t/update.test | 4 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/upgrade.test | 15 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_misc.test | 27 |
3 files changed, 39 insertions, 7 deletions
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/upgrade.test b/mysql-test/suite/vcol/t/upgrade.test index 3e221747dfa..146495d8ed0 100644 --- a/mysql-test/suite/vcol/t/upgrade.test +++ b/mysql-test/suite/vcol/t/upgrade.test @@ -11,3 +11,18 @@ select * from vcol_autoinc; insert vcol_autoinc (pk) values (1); select * from vcol_autoinc; drop table vcol_autoinc; + +# +# MDEV-17909 Problem by MariaDB Update 10.1.32 -> 10.2.19 (Incorrect information in file: .frm) +# +source include/have_partition.inc; +copy_file std_data/mdev17909#P#p20181029.MYD $datadir/test/t1#P#p20181029.MYD; +copy_file std_data/mdev17909#P#p20181029.MYI $datadir/test/t1#P#p20181029.MYI; +copy_file std_data/mdev17909#P#p20181128.MYD $datadir/test/t1#P#p20181128.MYD; +copy_file std_data/mdev17909#P#p20181128.MYI $datadir/test/t1#P#p20181128.MYI; +copy_file std_data/mdev17909.frm $datadir/test/t1.frm; +copy_file std_data/mdev17909.par $datadir/test/t1.par; +check table t1 for upgrade; +flush tables; +show create table t1; +drop table t1; diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index b351e1eb4a6..95b707e3e12 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 # |