diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-04-15 18:53:57 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-04-15 18:53:57 +0200 |
commit | cf8df9ca442200d9ea01d4480cb7bf70675ca188 (patch) | |
tree | 31450b004e38edf1aa92dae265ace5bc77f189cd /mysql-test/t/innodb_mysql_sync.test | |
parent | 4347e302a8f3410cecb159c1d90ac6bb00f00d1c (diff) | |
download | mariadb-git-cf8df9ca442200d9ea01d4480cb7bf70675ca188.tar.gz |
Bug #47459 Assertion in Diagnostics_area::set_eof_status on OPTIMIZE TABLE
This assertion could be triggered during execution of OPTIMIZE TABLE for
InnoDB tables. As part of optimize for InnoDB tables, the table is recreated
and then opened again. If the reopen failed for any reason, the assertion
would be triggered. This could for example be caused by a concurrent DROP
TABLE executed by a different connection. The reason for the assertion was
that any failures during reopening were ignored.
This patch fixes the problem by making sure that the result of reopening the
table is checked and that any error messages are sent to the client.
Test case added to innodb_mysql_sync.test.
Diffstat (limited to 'mysql-test/t/innodb_mysql_sync.test')
-rw-r--r-- | mysql-test/t/innodb_mysql_sync.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_mysql_sync.test b/mysql-test/t/innodb_mysql_sync.test index 3f061e30293..ee92ee9f52e 100644 --- a/mysql-test/t/innodb_mysql_sync.test +++ b/mysql-test/t/innodb_mysql_sync.test @@ -43,6 +43,43 @@ DROP TABLE t1; SET DEBUG_SYNC='RESET'; +--echo # +--echo # Bug#47459 Assertion in Diagnostics_area::set_eof_status on +--echo # OPTIMIZE TABLE +--echo # + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +connect (con1, localhost, root); +connection default; + +CREATE TABLE t1(a INT) ENGINE= InnoDB; + +--echo # Connection con1 +connection con1; +SET DEBUG_SYNC= "ha_admin_open_ltable SIGNAL opening WAIT_FOR dropped"; +--echo # Sending: +--send OPTIMIZE TABLE t1 + +--echo # Connection default +connection default; +SET DEBUG_SYNC= "now WAIT_FOR opening"; +DROP TABLE t1; +SET DEBUG_SYNC= "now SIGNAL dropped"; + +--echo # Connection con1 +connection con1; +--echo # Reaping: OPTIMIZE TABLE t1 +--reap + +--echo # Connection default +connection default; +disconnect con1; +SET DEBUG_SYNC= "RESET"; + + # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc |