summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-11-15 16:47:15 +0100
committerunknown <ingo@mysql.com>2005-11-15 16:47:15 +0100
commit15062e97e9f90cea52fd220d2fc5ec76faeb1748 (patch)
treeee999bf8478b1d03cb7bdfc9758896bcc7321441 /mysql-test
parent5412ee4f299a4a2d71db1b7e5f3e62132032fb00 (diff)
parent7d183320b0e9b271efe6017986b904b694d32310 (diff)
downloadmariadb-git-15062e97e9f90cea52fd220d2fc5ec76faeb1748.tar.gz
Merge mysql.com:/home/mydev/mysql-4.0-bug14397
into mysql.com:/home/mydev/mysql-4.0-4000
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/handler.result18
-rw-r--r--mysql-test/t/handler.test29
2 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result
index 5af153930d5..3a61236ea14 100644
--- a/mysql-test/r/handler.result
+++ b/mysql-test/r/handler.result
@@ -447,3 +447,21 @@ drop table t2;
drop table t3;
drop table t4;
drop table t5;
+create table t1 (c1 int);
+insert into t1 values (1);
+handler t1 open;
+handler t1 read first;
+c1
+1
+send the below to another connection, do not wait for the result
+ optimize table t1;
+proceed with the normal connection
+handler t1 read next;
+c1
+1
+handler t1 close;
+read the result from the other connection
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+proceed with the normal connection
+drop table t1;
diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test
index 53fe8c0a059..d91587b8070 100644
--- a/mysql-test/t/handler.test
+++ b/mysql-test/t/handler.test
@@ -339,3 +339,32 @@ drop table t2;
drop table t3;
drop table t4;
drop table t5;
+
+#
+# Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
+#
+create table t1 (c1 int);
+insert into t1 values (1);
+# client 1
+handler t1 open;
+handler t1 read first;
+# client 2
+connect (con2,localhost,root,,);
+connection con2;
+--exec echo send the below to another connection, do not wait for the result
+send optimize table t1;
+--sleep 1
+# client 1
+--exec echo proceed with the normal connection
+connection default;
+handler t1 read next;
+handler t1 close;
+# client 2
+--exec echo read the result from the other connection
+connection con2;
+reap;
+# client 1
+--exec echo proceed with the normal connection
+connection default;
+drop table t1;
+