summaryrefslogtreecommitdiff
path: root/mysql-test/t/kill.test
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-05-31 14:23:45 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-05-31 14:23:45 +0500
commit0f6df3f6b3a93217a3ea3da6ab4cb279ebdca130 (patch)
treedd4102b8ea7c4732bb5045966f7ec047bc494803 /mysql-test/t/kill.test
parent7312fd0c2faf663a75ee40a39303059f65c2c2b5 (diff)
parentcde3be8612d605818a9a14341f3368c4a1bb2aa4 (diff)
downloadmariadb-git-0f6df3f6b3a93217a3ea3da6ab4cb279ebdca130.tar.gz
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt mysql-test/r/auto_increment.result: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/insert.result: Auto merged mysql-test/r/insert_select.result: Auto merged mysql-test/r/insert_update.result: Auto merged mysql-test/r/key.result: Auto merged mysql-test/r/kill.result: Auto merged mysql-test/r/null.result: Auto merged mysql-test/r/null_key.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged BitKeeper/deleted/.del-ps_6bdb.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged mysql-test/r/strict.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/kill.test: Auto merged mysql-test/t/strict.test: Auto merged sql/field.cc: Auto merged sql/field_conv.cc: Auto merged sql/item_func.cc: Auto merged mysql-test/r/type_enum.result: merging mysql-test/r/warnings.result: merging mysql-test/t/type_enum.test: merging sql/sql_select.cc: merging
Diffstat (limited to 'mysql-test/t/kill.test')
-rw-r--r--mysql-test/t/kill.test53
1 files changed, 53 insertions, 0 deletions
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index f3ec9dd3430..959938dcb03 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -249,3 +249,56 @@ select release_lock("lock27563");
drop table t1, t2;
drop function bug27563;
drop procedure proc27563;
+
+#
+# Bug#28598: mysqld crash when killing a long-running explain query.
+#
+--disable_query_log
+connection con1;
+let $ID= `select connection_id()`;
+let $tab_count= 40;
+
+let $i= $tab_count;
+while ($i)
+{
+ eval CREATE TABLE t$i (a$i int, KEY(a$i));
+ eval INSERT INTO t$i VALUES (1),(2),(3),(4),(5),(6),(7);
+ dec $i ;
+}
+set session optimizer_search_depth=0;
+
+let $i=$tab_count;
+while ($i)
+{
+ let $a= a$i;
+ let $t= t$i;
+ dec $i;
+ if ($i)
+ {
+ let $comma=,;
+ let $from=$comma$t$from;
+ let $where=a$i=$a $and $where;
+ }
+ if (!$i)
+ {
+ let $from=FROM $t$from;
+ let $where=WHERE $where;
+ }
+ let $and=AND;
+}
+
+--enable_query_log
+eval PREPARE stmt FROM 'EXPLAIN SELECT * $from $where';
+send EXECUTE stmt;
+--disable_query_log
+
+connection con2;
+real_sleep 2;
+eval kill query $ID;
+let $i= $tab_count;
+while ($i)
+{
+ eval DROP TABLE t$i;
+ dec $i ;
+}
+--enable_query_log