From ea1d5943c5aa4e66fa3f36333043dc6fed0a9d60 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 25 Jan 2013 21:40:42 +0200 Subject: Fixed MDEV-3890: Server crash inserting record on a temporary table after truncating it The problem was that a temporary table was re-created as a non-temporary table. mysql-test/suite/maria/truncate.result: Added test cases mysql-test/suite/maria/truncate.test: Added test cases sql/sql_truncate.cc: Mark that table to be created is a temporary table storage/maria/ha_maria.cc: Ensure that temporary tables are not transactional. --- sql/sql_truncate.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_truncate.cc') diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 979dde30ceb..4b77344c042 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -263,6 +263,7 @@ static bool recreate_temporary_table(THD *thd, TABLE *table) DBUG_ENTER("recreate_temporary_table"); memset(&create_info, 0, sizeof(create_info)); + create_info.options|= HA_LEX_CREATE_TMP_TABLE; table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK); -- cgit v1.2.1