diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-07-06 18:17:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-07-06 22:18:35 +0300 |
commit | 934d5f95d33ee6980ede7e1990b519fd13bee327 (patch) | |
tree | 632336a7d0b3d58a91d00c611cb79fb020e5f092 /mysql-test | |
parent | b4c377f21510849a67bcb0c72e8715903883ce4d (diff) | |
parent | 8b0d4cff0760b0a35285c315d82c49631c108baf (diff) | |
download | mariadb-git-934d5f95d33ee6980ede7e1990b519fd13bee327.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/cte_recursive.result | 21 | ||||
-rw-r--r-- | mysql-test/main/cte_recursive.test | 31 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result | 32 | ||||
-rw-r--r-- | mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test | 46 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/incremental_encrypted.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/incremental_encrypted.test | 1 |
6 files changed, 77 insertions, 55 deletions
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result index 37f77f320ef..4becc038543 100644 --- a/mysql-test/main/cte_recursive.result +++ b/mysql-test/main/cte_recursive.result @@ -3306,27 +3306,6 @@ SELECT func(); func() 1 DROP FUNCTION func; -# -# MDEV-15151: function with recursive CTE using no base tables -# (duplicate of MDEV-16661) -# -connection default; -CREATE TABLE t1 (id int KEY); -INSERT INTO t1 VALUES (0), (1),(2); -CREATE OR REPLACE FUNCTION func() RETURNS int -RETURN -( -WITH recursive cte AS -(SELECT 1 a UNION SELECT cte.* FROM cte natural join t1) -SELECT * FROM cte limit 1 -); -connect con1,localhost,root,,; -SELECT func(); -connection default; -KILL QUERY 5; -DROP FUNCTION func; -DROP TABLE t1; -disconnect con1; # Start of 10.3 tests # # MDEV-14217 [db crash] Recursive CTE when SELECT includes new field diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test index 4b91c04cd49..109f7d73011 100644 --- a/mysql-test/main/cte_recursive.test +++ b/mysql-test/main/cte_recursive.test @@ -1,4 +1,3 @@ ---source include/not_embedded.inc create table t1 (a int, b varchar(32)); insert into t1 values (4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd'); @@ -2325,36 +2324,6 @@ SELECT func(); DROP FUNCTION func; ---echo # ---echo # MDEV-15151: function with recursive CTE using no base tables ---echo # (duplicate of MDEV-16661) ---echo # - ---connection default - -CREATE TABLE t1 (id int KEY); -INSERT INTO t1 VALUES (0), (1),(2); - -CREATE OR REPLACE FUNCTION func() RETURNS int -RETURN -( - WITH recursive cte AS - (SELECT 1 a UNION SELECT cte.* FROM cte natural join t1) - SELECT * FROM cte limit 1 -); - ---connect (con1,localhost,root,,) ---let $conid= `SELECT CONNECTION_ID()` ---send SELECT func() - ---connection default ---eval KILL QUERY $conid ---source include/restart_mysqld.inc - -DROP FUNCTION func; -DROP TABLE t1; ---disconnect con1 - --echo # Start of 10.3 tests --echo # diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result index e2d503cf134..fa15be0352f 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result @@ -175,8 +175,38 @@ SET DEBUG_SYNC='now WAIT_FOR halfway'; COMMIT; InnoDB 0 transactions not purged SET DEBUG_SYNC='now SIGNAL purged'; -disconnect prevent_purge; connection default; DROP TABLE t1; +CREATE TABLE t1 (y YEAR, vy YEAR AS (y) VIRTUAL UNIQUE, pk INT PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 (pk,y) VALUES (1,2022); +CREATE TABLE t2(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB; +SET GLOBAL debug_dbug = '+d,ib_purge_virtual_index_callback'; +BEGIN; +INSERT INTO t2(f1) VALUES(1); +connection prevent_purge; +SET DEBUG_SYNC=RESET; +start transaction with consistent snapshot; +connection default; +COMMIT; +connect truncate,localhost,root,,; +REPLACE INTO t1(pk, y) SELECT pk,y FROM t1; +SET DEBUG_SYNC='row_trunc_before_dict_lock SIGNAL commit WAIT_FOR release'; +TRUNCATE TABLE t1; +connection prevent_purge; +SET DEBUG_SYNC='now WAIT_FOR commit'; +COMMIT; +SET DEBUG_SYNC='now SIGNAL purge_start'; +disconnect prevent_purge; +connection default; +SET DEBUG_SYNC='now WAIT_FOR purge_start'; +InnoDB 2 transactions not purged +SET DEBUG_SYNC='now SIGNAL release'; +SET GLOBAL debug_dbug=@old_dbug; +connection truncate; +disconnect truncate; +connection default; +InnoDB 0 transactions not purged +DROP TABLE t1, t2; set debug_sync=reset; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test index 7feeee768ff..1f67c8c8491 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -156,7 +156,7 @@ INSERT INTO t1(a, b) VALUES (8, 8); COMMIT; --echo # wait for purge to process the deleted/updated records. -let $wait_all_purged=1; +let $wait_all_purged=2; --source ../../innodb/include/wait_all_purged.inc let $wait_all_purged=0; @@ -217,12 +217,54 @@ SET DEBUG_SYNC='now WAIT_FOR halfway'; COMMIT; --source ../../innodb/include/wait_all_purged.inc SET DEBUG_SYNC='now SIGNAL purged'; -disconnect prevent_purge; connection default; reap; DROP TABLE t1; +CREATE TABLE t1 (y YEAR, vy YEAR AS (y) VIRTUAL UNIQUE, pk INT PRIMARY KEY) +ENGINE=InnoDB; + +INSERT INTO t1 (pk,y) VALUES (1,2022); +CREATE TABLE t2(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB; + +SET GLOBAL debug_dbug = '+d,ib_purge_virtual_index_callback'; + +BEGIN; +INSERT INTO t2(f1) VALUES(1); +connection prevent_purge; +SET DEBUG_SYNC=RESET; +start transaction with consistent snapshot; +connection default; +COMMIT; + +connect(truncate,localhost,root,,); +REPLACE INTO t1(pk, y) SELECT pk,y FROM t1; +SET DEBUG_SYNC='row_trunc_before_dict_lock SIGNAL commit WAIT_FOR release'; +send TRUNCATE TABLE t1; + +connection prevent_purge; +SET DEBUG_SYNC='now WAIT_FOR commit'; +COMMIT; +SET DEBUG_SYNC='now SIGNAL purge_start'; +disconnect prevent_purge; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR purge_start'; +let $wait_all_purged=2; +--source ../../innodb/include/wait_all_purged.inc +let $wait_all_purged=0; +SET DEBUG_SYNC='now SIGNAL release'; +SET GLOBAL debug_dbug=@old_dbug; + +connection truncate; +reap; +disconnect truncate; + +connection default; +--source ../../innodb/include/wait_all_purged.inc +DROP TABLE t1, t2; + --source include/wait_until_count_sessions.inc set debug_sync=reset; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.result b/mysql-test/suite/mariabackup/incremental_encrypted.result index e8f81e9fa49..e9525c9c4b7 100644 --- a/mysql-test/suite/mariabackup/incremental_encrypted.result +++ b/mysql-test/suite/mariabackup/incremental_encrypted.result @@ -2,6 +2,7 @@ call mtr.add_suppression("InnoDB: New log files created"); CREATE TABLE t(i INT) ENGINE INNODB ENCRYPTED=YES; INSERT INTO t VALUES(1); # Create full backup , modify table, then create incremental/differential backup +SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t VALUES(2); SELECT * FROM t; i diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.test b/mysql-test/suite/mariabackup/incremental_encrypted.test index 8bcada493c6..e618ac4f79e 100644 --- a/mysql-test/suite/mariabackup/incremental_encrypted.test +++ b/mysql-test/suite/mariabackup/incremental_encrypted.test @@ -20,6 +20,7 @@ echo # Create full backup , modify table, then create incremental/differential b exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log +SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t VALUES(2); SELECT * FROM t; |