summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-05-31 19:37:24 +0200
committerunknown <ingo@mysql.com>2005-05-31 19:37:24 +0200
commitd825d48fa48d499f61dafb4256a97dd471cb921a (patch)
tree3a0071aee0fc84c8565299dbf4136b73fbea5c29 /mysql-test
parent7582d6952835d424bb6ff77526f9bf2499950de3 (diff)
parent1ba82d32803f662db4de54c445f5e9c6db7250ef (diff)
downloadmariadb-git-d825d48fa48d499f61dafb4256a97dd471cb921a.tar.gz
Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Hand merged from 4.0. sql/lock.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_table.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result8
-rw-r--r--mysql-test/t/create.test15
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 103bed598ef..7bec98b0687 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -563,3 +563,11 @@ select * from t2;
b
1
drop table t1,t2;
+create table t1 (a int);
+create table t1 select * from t1;
+INSERT TABLE 't1' isn't allowed in FROM table list
+create table t2 union = (t1) select * from t1;
+INSERT TABLE 't1' isn't allowed in FROM table list
+flush tables with read lock;
+unlock tables;
+drop table t1;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index ce85e530569..5677a9cccb2 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -460,3 +460,18 @@ insert into t2 values ();
select * from t1;
select * from t2;
drop table t1,t2;
+
+#
+# Bug#10224 - ANALYZE TABLE crashing with simultaneous
+# CREATE ... SELECT statement.
+# This tests two additional possible errors and a hang if
+# an improper fix is present.
+#
+create table t1 (a int);
+--error 1093
+create table t1 select * from t1;
+--error 1093
+create table t2 union = (t1) select * from t1;
+flush tables with read lock;
+unlock tables;
+drop table t1;