summaryrefslogtreecommitdiff
path: root/mysql-test/main/create_or_replace.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-22 11:47:09 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-22 11:47:09 +0200
commit4ec8598c1dcb63499bce998142b8e5b8b09b2d30 (patch)
tree23010dcb3489b54b4bc9b26481a4a16a4378914a /mysql-test/main/create_or_replace.result
parentfe3bf136b6cf83aac5a6e21d3db1c4e821612017 (diff)
parentafe5a51c2df95aa282e4459afeb7f037563def92 (diff)
downloadmariadb-git-4ec8598c1dcb63499bce998142b8e5b8b09b2d30.tar.gz
Merge branch 'github/10.2' into 10.3
Diffstat (limited to 'mysql-test/main/create_or_replace.result')
-rw-r--r--mysql-test/main/create_or_replace.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result
index e26884f1cbf..0c1bccb861a 100644
--- a/mysql-test/main/create_or_replace.result
+++ b/mysql-test/main/create_or_replace.result
@@ -459,6 +459,26 @@ UNLOCK TABLES;
DROP FUNCTION f1;
DROP TABLE t1;
#
+# MDEV-11129
+# CREATE OR REPLACE TABLE t1 AS SELECT spfunc() crashes if spfunc()
+# references t1
+#
+CREATE OR REPLACE TABLE t1(a INT);
+CREATE FUNCTION f1() RETURNS VARCHAR(16383)
+BEGIN
+INSERT INTO t1 VALUES(1);
+RETURN 'test';
+END;
+$$
+CREATE OR REPLACE TABLE t1 AS SELECT f1();
+ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data
+LOCK TABLE t1 WRITE;
+CREATE OR REPLACE TABLE t1 AS SELECT f1();
+ERROR HY000: Table 't1' was not locked with LOCK TABLES
+UNLOCK TABLES;
+DROP FUNCTION f1;
+DROP TABLE t1;
+#
# MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in
# Locked_tables_list::unlock_locked_tables
#