Commit c0317445 authored by Konstantin Osipov's avatar Konstantin Osipov

----------------------------------------------------------

revno: 2617.69.33
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-next-46452
timestamp: Wed 2009-08-19 18:39:31 +0400
message:
  Bug#46452 "Crash in MDL, HANDLER OPEN + TRUNCATE TABLE".
  Flush open HANDLER tables before TRUNCATE, which is a DDL.


mysql-test/r/truncate.result:
  Update results for Bug#46452.
mysql-test/t/truncate.test:
  Add a test case for Bug#46452 "Crash in MDL, HANDLER OPEN + TRUNCATE TABLE".
parent cb4e624f
......@@ -60,3 +60,17 @@ truncate table v1;
ERROR 42S02: Table 'test.v1' doesn't exist
drop view v1;
drop table t1;
#
# Bug#46452 Crash in MDL, HANDLER OPEN + TRUNCATE TABLE
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 AS SELECT 1 AS f1;
HANDLER t1 OPEN;
# Here comes the crash.
TRUNCATE t1;
# Currently TRUNCATE, just like other DDL, implicitly closes
# open HANDLER table.
HANDLER t1 READ FIRST;
ERROR 42S02: Unknown table 't1' in HANDLER
DROP TABLE t1;
# End of 6.0 tests
......@@ -69,3 +69,26 @@ drop table t1;
# End of 5.0 tests
--echo #
--echo # Bug#46452 Crash in MDL, HANDLER OPEN + TRUNCATE TABLE
--echo #
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 AS SELECT 1 AS f1;
HANDLER t1 OPEN;
--echo # Here comes the crash.
TRUNCATE t1;
--echo # Currently TRUNCATE, just like other DDL, implicitly closes
--echo # open HANDLER table.
--error ER_UNKNOWN_TABLE
HANDLER t1 READ FIRST;
# Cleanup
DROP TABLE t1;
--echo # End of 6.0 tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment