summaryrefslogtreecommitdiff
path: root/mysql-test/t/warnings_debug.test
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-11-03 22:40:53 +0100
committerunknown <knielsen@knielsen-hq.org>2010-11-03 22:40:53 +0100
commite55c4836a1717bed3d2078617f0795bf61864bec (patch)
tree7dbb5342d7351944acb8de4b42173a7c0a7a45c9 /mysql-test/t/warnings_debug.test
parent3bac9cf7fe12c1b1c644ac7963c701b79b3127f3 (diff)
downloadmariadb-git-e55c4836a1717bed3d2078617f0795bf61864bec.tar.gz
MBug#643463: slow XtraDB shutdown due to 10 second sleep in purge thread
Implement os_event_wait_time() for POSIX systems. In the purge thread, use os_event_wait_time() when sleeping rather than sleep, and signal the event when server shuts down, so we do not need to wait for upto 10 seconds until the purge thread wakes up. Also fix bug that warnings that were pushed after we call set_ok_status() were not included in the waning count sent to the client in the result packet. Also in mysqltest, in recursive die() invocation at least print the message before aborting. client/mysqltest.cc: If we detect recursive die(), at least print the message before aborting. mysql-test/r/warnings_debug.result: Test case. mysql-test/t/warnings_debug.test: Test case. sql/handler.cc: Force generation of a warning with specific debug option, for testing. sql/protocol.cc: Fix wrong DBUG_ENTER sql/sql_class.h: Add method to count warnings pushed after set_ok_status() is called. sql/sql_error.cc: Also count warnings pushed after set_ok_status() is called. storage/xtradb/include/os0sync.h: Implement working os_sync_wait_time() for POSIX. storage/xtradb/include/srv0srv.h: Make the purge thread wait for an event when sleeping, so we can signal it to wakeup immediately at shutdown. storage/xtradb/log/log0log.c: Make the purge thread wait for an event when sleeping, so we can signal it to wakeup immediately at shutdown. storage/xtradb/os/os0sync.c: Implement working os_sync_wait_time() for POSIX. storage/xtradb/srv/srv0srv.c: Make the purge thread wait for an event when sleeping, so we can signal it to wakeup immediately at shutdown.
Diffstat (limited to 'mysql-test/t/warnings_debug.test')
-rw-r--r--mysql-test/t/warnings_debug.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/warnings_debug.test b/mysql-test/t/warnings_debug.test
new file mode 100644
index 00000000000..99d02330960
--- /dev/null
+++ b/mysql-test/t/warnings_debug.test
@@ -0,0 +1,19 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (a int primary key) engine=innodb;
+
+# Test that warnings produced during autocommit (after calling
+# set_ok_status()) are still reported to the client.
+SET SESSION debug="+d,warn_during_ha_commit_trans";
+INSERT INTO t1 VALUES (1);
+# The warning will be shown automatically by mysqltest; there was a bug where
+# this didn't happen because the warning was not counted when sending result
+# packet. Show the warnings manually also.
+SHOW WARNINGS;
+
+drop table t1;