summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/schema.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/schema.result
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/schema.result')
-rw-r--r--mysql-test/main/schema.result101
1 files changed, 101 insertions, 0 deletions
diff --git a/mysql-test/main/schema.result b/mysql-test/main/schema.result
new file mode 100644
index 00000000..1f130db7
--- /dev/null
+++ b/mysql-test/main/schema.result
@@ -0,0 +1,101 @@
+create schema foo;
+show create schema foo;
+Database Create Database
+foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */
+show schemas;
+Database
+foo
+information_schema
+mtr
+mysql
+performance_schema
+sys
+test
+drop schema foo;
+#
+# Bug #48940 MDL deadlocks against mysql_rm_db
+#
+connect con2, localhost, root;
+connection default;
+CREATE SCHEMA schema1;
+CREATE TABLE schema1.t1 (a INT);
+START TRANSACTION;
+INSERT INTO schema1.t1 VALUES (1);
+connection con2;
+DROP SCHEMA schema1;
+connection default;
+ALTER SCHEMA schema1 DEFAULT CHARACTER SET utf8;
+Got one of the listed errors
+COMMIT;
+connection con2;
+connection default;
+disconnect con2;
+#
+# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
+#
+connect con2, localhost, root;
+connection default;
+CREATE SCHEMA schema1;
+CREATE TABLE schema1.t1 (id INT);
+LOCK TABLE schema1.t1 WRITE;
+connection con2;
+DROP SCHEMA schema1;
+connection default;
+# CREATE SCHEMA used to give a deadlock.
+# Now we prohibit CREATE SCHEMA in LOCK TABLES mode.
+CREATE SCHEMA IF NOT EXISTS schema1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+# UNLOCK TABLES so DROP SCHEMA can continue.
+UNLOCK TABLES;
+connection con2;
+connection default;
+disconnect con2;
+#
+# Bug#54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
+#
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+INSERT INTO db1.t1 VALUES (1), (2);
+connect con1, localhost, root;
+HANDLER db1.t1 OPEN;
+connection default;
+# Sending:
+DROP DATABASE db1;
+connect con2, localhost, root;
+connection con1;
+CREATE DATABASE db2;
+ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
+DROP DATABASE db2;
+HANDLER t1 CLOSE;
+connection default;
+# Reaping: DROP DATABASE db1
+disconnect con1;
+disconnect con2;
+#
+# Tests for increased CREATE/ALTER/DROP DATABASE concurrency with
+# database name locks.
+#
+connect con2, localhost, root;
+connect con3, localhost, root;
+connection default;
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (id INT);
+START TRANSACTION;
+INSERT INTO db1.t1 VALUES (1);
+connection con2;
+# DROP DATABASE should block due to the active transaction
+# Sending:
+DROP DATABASE db1;
+connection con3;
+# But it should still be possible to CREATE/ALTER/DROP other databases.
+CREATE DATABASE db2;
+ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
+DROP DATABASE db2;
+connection default;
+# End the transaction so DROP DATABASE db1 can continue
+COMMIT;
+connection con2;
+# Reaping: DROP DATABASE db1
+connection default;
+disconnect con2;
+disconnect con3;