summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-17 13:21:27 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-17 13:21:27 +0200
commit9dc81d2a7a6467cea2dc456d75e22d93ad192e1e (patch)
tree541221541cbb7e77b073d229829f97530ea78fb6 /mysql-test/suite
parent890e0278706768e18b28582329418c8943d6a6bd (diff)
parent77cbaa96ad9a6077d271bf97b0c0dc8cdf5b5991 (diff)
downloadmariadb-git-9dc81d2a7a6467cea2dc456d75e22d93ad192e1e.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-alter.result28
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-alter.test38
-rw-r--r--mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result380
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result1
-rw-r--r--mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test161
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test3
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns.result13
-rw-r--r--mysql-test/suite/innodb/t/innodb-virtual-columns.test11
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result2
-rw-r--r--mysql-test/suite/sys_vars/r/table_definition_cache_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/t/table_definition_cache_basic.test6
12 files changed, 638 insertions, 23 deletions
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
index 1d5b88bc750..995360a5744 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
@@ -77,7 +77,6 @@ t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-DROP TABLE t2;
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
ERROR HY000: Can't create table `test`.`t3` (errno: 140 "Wrong create options")
SHOW WARNINGS;
@@ -85,3 +84,30 @@ Level Code Message
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
Error 1005 Can't create table `test`.`t3` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+FLUSH TABLES;
+create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes;
+insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8);
+insert into t1 select * from t1;
+BEGIN;
+INSERT INTO t2 VALUES (1);
+connect con1, localhost, root;
+SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL done WAIT_FOR ever';
+alter table t1 force;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR done';
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+COMMIT;
+disconnect con1;
+select * from t1;
+f1 f2
+1 2
+2 3
+4 5
+5 6
+7 8
+1 2
+2 3
+4 5
+5 6
+7 8
+drop table t1,t2;
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index e8391d97d6c..a6a4dbaff9b 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -1,13 +1,12 @@
-- source include/have_innodb.inc
+-- source include/have_debug.inc
+-- source include/have_debug_sync.inc
-- source include/have_file_key_management_plugin.inc
#
# MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
#
-let $encrypt_tables = `SELECT @@innodb_encrypt_tables`;
-let $threads = `SELECT @@innodb_encryption_threads`;
-
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
@@ -99,14 +98,35 @@ ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
SHOW WARNINGS;
SHOW CREATE TABLE t2;
-DROP TABLE t2;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
SHOW WARNINGS;
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables;
-EVAL SET GLOBAL innodb_encryption_threads = $threads;
---enable_query_log
+FLUSH TABLES;
+
+create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes;
+insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8);
+insert into t1 select * from t1;
+BEGIN;
+INSERT INTO t2 VALUES (1);
+
+connect con1, localhost, root;
+SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL done WAIT_FOR ever';
+send alter table t1 force;
+
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR done';
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+COMMIT;
+
+--let $shutdown_timeout= 0
+--source include/restart_mysqld.inc
+disconnect con1;
+
+select * from t1;
+drop table t1,t2;
+
+# Work around missing crash recovery at the SQL layer.
+let $datadir= `select @@datadir`;
+--remove_files_wildcard $datadir/test #sql-*.frm
diff --git a/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result b/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
new file mode 100644
index 00000000000..3eb638ca49a
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
@@ -0,0 +1,380 @@
+CREATE TABLE user(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE user_session(id int primary key, fk1 int, fk2 int) ENGINE=InnoDB;
+alter table user_session add foreign key (fk1) references user(id);
+INSERT INTO user values (1,0), (2,0), (3,0), (4,0);
+INSERT INTO user_session values (1,1,1);
+connect node_1_u, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_1_i, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2_i, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+"Phase 1: plain SQL statements"
+connection node_1;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+"Phase 2: prepared statements"
+connection node_1_u;
+prepare upd from 'update user set j = j + 1 WHERE id > 0';
+connection node_1_i;
+prepare ins1 from 'insert into user_session(id,fk1,fk2) values (2, 2, 2)';
+connection node_2_i;
+prepare ins2 from 'insert into user_session(id,fk1,fk2) values (2, 2, 3)';
+connection node_1;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1;
+drop table user_session,user;
diff --git a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
index cdf330643c2..380a0235ac2 100644
--- a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
+++ b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
@@ -150,6 +150,7 @@ connection node_3;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+set global gtid_slave_pos="";
reset master;
#Connection 3
connection node_3;
diff --git a/mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test b/mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test
new file mode 100644
index 00000000000..02322fc02ec
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test
@@ -0,0 +1,161 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+#
+# This test will reproduce regressions of bugs
+# https://github.com/codership/mysql-wsrep/issues/335
+# https://github.com/codership/mysql-wsrep/issues/336
+#
+# The test will issue duplicate inserts into a table, which has foreign key
+# constraint for a parent table.
+# The inserts happen in separate nodes, and the
+# The test outline is as follows:
+# 1. in node 1, an update is done for the FK parent row, in a transaction,
+# which is left open. The purpose of this is just to establish a X lock on
+# the parent row.
+# 2. in node 1, an insert for the child table is sent. The insert will have to wait
+# for the parent row X lock, because it needs S lock on the same row.
+# However, we have set an DBUG sync point just before the insert will call for
+# innodb suspend
+# 3. in node 2, a similar insert is issued. This will replicate to node 1 and try to
+# abort the conflicting update and blocked insert
+# 4. the inserts dbug sync point is relased, and insert should continue and abort
+# gracefully
+# 5. update is continued to commit, and it should also observe the deadlock
+#
+# This test is run in 3 phases:
+#
+# 1. with plain SQL statement
+# 2. as SQL prepared statements
+# 3. as SQl stored procedures
+#
+# The test phase 3 is for reproducing the issue in bug #336 specifically
+#
+
+#
+# create the test tables and foreign key constraint between them
+#
+CREATE TABLE user(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE user_session(id int primary key, fk1 int, fk2 int) ENGINE=InnoDB;
+alter table user_session add foreign key (fk1) references user(id);
+
+# populate a few initial rows
+INSERT INTO user values (1,0), (2,0), (3,0), (4,0);
+INSERT INTO user_session values (1,1,1);
+
+#
+# prepare test connections, for:
+# update of parent row in node1
+# insert of child row in node1
+# insert of child row in node2
+
+--connect node_1_u, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_i, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2_i, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+
+#
+# test phase 1: plain SQL statements
+#
+--echo "Phase 1: plain SQL statements"
+
+
+--connection node_1
+let $counter=10;
+let $sleep_period=1;
+
+while($counter > 0)
+{
+ --connection node_1_u
+ begin;
+ update user set j = j + 1 WHERE id > 0;
+
+ --connection node_1_i
+ set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+ send insert into user_session(id,fk1,fk2) values (2, 2, 2);
+
+ --connection node_1
+ set debug_sync='now WAIT_FOR ins_waiting';
+
+ --connection node_2_i
+ insert into user_session(id,fk1,fk2) values (2, 2, 3);
+
+ --connection node_1
+ set debug_sync='now SIGNAL cont_ins';
+
+ --connection node_1_i
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ reap;
+
+ --connection node_1_u
+ --error 0,ER_LOCK_DEADLOCK
+ commit;
+
+ --connection node_1
+ --error 0,ER_LOCK_DEADLOCK
+ truncate user_session;
+ set debug_sync = reset;
+
+ dec $counter;
+}
+
+#
+# test phase 2: prepared statements
+#
+--echo "Phase 2: prepared statements"
+
+--connection node_1_u
+prepare upd from 'update user set j = j + 1 WHERE id > 0';
+
+--connection node_1_i
+prepare ins1 from 'insert into user_session(id,fk1,fk2) values (2, 2, 2)';
+
+--connection node_2_i
+prepare ins2 from 'insert into user_session(id,fk1,fk2) values (2, 2, 3)';
+
+--connection node_1
+let $counter=10;
+let $sleep_period=1;
+
+while($counter > 0)
+{
+ --connection node_1_u
+ begin;
+ execute upd;
+ #update user set j = j + 1 WHERE id > 0;
+
+ --connection node_1_i
+ set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+ send execute ins1;
+
+ --connection node_1
+ set debug_sync='now WAIT_FOR ins_waiting';
+
+ --connection node_2_i
+ execute ins2;
+
+ --connection node_1
+ set debug_sync='now SIGNAL cont_ins';
+
+ --connection node_1_i
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ reap;
+
+ --connection node_1_u
+ --error 0,ER_LOCK_DEADLOCK
+ commit;
+
+ --connection node_1
+
+ --error 0,ER_LOCK_DEADLOCK
+ truncate user_session;
+ set debug_sync = reset;
+
+ dec $counter;
+}
+
+
+--connection node_1
+
+drop table user_session,user;
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
index 3fe94ad16b7..3ed7ec1d09e 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
+++ b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
@@ -196,6 +196,9 @@ DROP TABLE t2,t1;
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
+--disable_warnings
+set global gtid_slave_pos="";
+--enable_warnings
reset master;
--echo #Connection 3
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
index 6fbb7dcc58f..bf21e352681 100644
--- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
@@ -330,3 +330,16 @@ term uw_id plan wdraw_rsn admit_term
1035 2 CSM ACAD 1009
drop table grad_degree;
drop table gso_grad_supr;
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL, FULLTEXT KEY(b)) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+SELECT * FROM t1;
+a b c
+1 foo 1
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+ALTER TABLE t1 ADD FULLTEXT KEY(b);
+SELECT * FROM t1;
+a b c
+1 foo 1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns.test b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
index 0e0d6dbb2f5..faf542645fb 100644
--- a/mysql-test/suite/innodb/t/innodb-virtual-columns.test
+++ b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
@@ -306,3 +306,14 @@ select * from gso_grad_supr;
drop table grad_degree;
drop table gso_grad_supr;
+
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL, FULLTEXT KEY(b)) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+ALTER TABLE t1 ADD FULLTEXT KEY(b);
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 2ae552ca797..564cba970b0 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -4165,7 +4165,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
-NUMERIC_MAX_VALUE 524288
+NUMERIC_MAX_VALUE 2097152
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 4974ec04ba7..b3d41302d9a 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -5131,7 +5131,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
-NUMERIC_MAX_VALUE 524288
+NUMERIC_MAX_VALUE 2097152
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
diff --git a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
index 54b50c5ff75..69f3d42d2fb 100644
--- a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
+++ b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
@@ -28,14 +28,14 @@ Warning 1292 Truncated incorrect table_definition_cache value: '2'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
400
-SET @@global.table_definition_cache = 524287;
+SET @@global.table_definition_cache = 2097151;
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524287
-SET @@global.table_definition_cache = 524288;
+2097151
+SET @@global.table_definition_cache = 2097152;
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524288
+2097152
'#--------------------FN_DYNVARS_019_04-------------------------#'
SET @@global.table_definition_cache = 0;
Warnings:
@@ -49,18 +49,18 @@ Warning 1292 Truncated incorrect table_definition_cache value: '-1024'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
400
-SET @@global.table_definition_cache = 524289;
+SET @@global.table_definition_cache = 2097153;
Warnings:
-Warning 1292 Truncated incorrect table_definition_cache value: '524289'
+Warning 1292 Truncated incorrect table_definition_cache value: '2097153'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524288
+2097152
SET @@global.table_definition_cache = 42949672950;
Warnings:
Warning 1292 Truncated incorrect table_definition_cache value: '42949672950'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524288
+2097152
SET @@global.table_definition_cache = 21221204.10;
ERROR 42000: Incorrect argument type to variable 'table_definition_cache'
SET @@global.table_definition_cache = ON;
diff --git a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
index dc0903c5d40..d7a6ff25a0b 100644
--- a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
+++ b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
@@ -64,9 +64,9 @@ SET @@global.table_definition_cache = 1;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = 2;
SELECT @@global.table_definition_cache;
-SET @@global.table_definition_cache = 524287;
+SET @@global.table_definition_cache = 2097151;
SELECT @@global.table_definition_cache;
-SET @@global.table_definition_cache = 524288;
+SET @@global.table_definition_cache = 2097152;
SELECT @@global.table_definition_cache;
@@ -79,7 +79,7 @@ SET @@global.table_definition_cache = 0;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = -1024;
SELECT @@global.table_definition_cache;
-SET @@global.table_definition_cache = 524289;
+SET @@global.table_definition_cache = 2097153;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = 42949672950;
SELECT @@global.table_definition_cache;