From c03174458a46f382926abfcd669e8edd521dd59c Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Wed, 9 Dec 2009 12:29:36 +0300 Subject: ---------------------------------------------------------- revno: 2617.69.33 committer: Konstantin Osipov 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". --- mysql-test/r/truncate.result | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/r/truncate.result') diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index b194f9b7dc6..8ce2ad9be21 100644 --- a/mysql-test/r/truncate.result +++ b/mysql-test/r/truncate.result @@ -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 -- cgit v1.2.1