summaryrefslogtreecommitdiff
path: root/mysql-test/t/filesort_debug.test
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2011-02-24 08:00:12 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2011-02-24 08:00:12 +0100
commit69b82937591f6e5cf30ec75d1ba7caf0cb69ead4 (patch)
tree2f23573f944768da4c1842ffb310fab80623d094 /mysql-test/t/filesort_debug.test
parent19372f10940cef96664577a69e835ff3cdee8383 (diff)
downloadmariadb-git-69b82937591f6e5cf30ec75d1ba7caf0cb69ead4.tar.gz
Bug #11747102 30771: LOG MORE INFO ABOUT THREADS KILL'D AND SORT ABORTED MESSAGES
mysql-test/r/filesort_debug.result: New test case. mysql-test/t/filesort_debug.test: New test case. sql/filesort.cc: thd->killed does not imply thd->is_error(), so test for that separately.
Diffstat (limited to 'mysql-test/t/filesort_debug.test')
-rw-r--r--mysql-test/t/filesort_debug.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/t/filesort_debug.test b/mysql-test/t/filesort_debug.test
index 0058a6a3aa7..724ebc90368 100644
--- a/mysql-test/t/filesort_debug.test
+++ b/mysql-test/t/filesort_debug.test
@@ -1,4 +1,6 @@
--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/count_sessions.inc
SET @old_debug= @@session.debug;
@@ -21,3 +23,37 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
DROP TABLE t1;
DROP FUNCTION f1;
+
+--echo #
+--echo # Bug #11747102
+--echo # 30771: LOG MORE INFO ABOUT THREADS KILL'D AND SORT ABORTED MESSAGES
+--echo #
+
+connect (con1, localhost, root);
+connect (con2, localhost, root);
+
+--echo # connection 1
+connection con1;
+CREATE TABLE t1(f0 int auto_increment primary key, f1 int);
+INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
+
+let $ID= `SELECT @id := CONNECTION_ID()`;
+
+SET DEBUG_SYNC='filesort_start SIGNAL filesort_started WAIT_FOR filesort_killed';
+--echo # Sending: (not reaped since connection is killed later)
+--send SELECT * FROM t1 ORDER BY f1 ASC, f0
+
+--echo # connection 2
+connection con2;
+let $ignore= `SELECT @id := $ID`;
+SET DEBUG_SYNC='now WAIT_FOR filesort_started';
+KILL @id;
+SET DEBUG_SYNC='now SIGNAL filesort_killed';
+
+--echo # connection default
+connection default;
+disconnect con1;
+disconnect con2;
+--source include/wait_until_count_sessions.inc
+SET DEBUG_SYNC= "RESET";
+DROP TABLE t1;