diff options
author | Michael Widenius <monty@askmonty.org> | 2013-01-25 21:40:42 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-01-25 21:40:42 +0200 |
commit | ea1d5943c5aa4e66fa3f36333043dc6fed0a9d60 (patch) | |
tree | 3df5f401ad4a6d27d41b251850769cc0ea2bde57 /sql/sql_truncate.cc | |
parent | 32151409c13ddc09ebda7cd02fdfe40db290503e (diff) | |
download | mariadb-git-ea1d5943c5aa4e66fa3f36333043dc6fed0a9d60.tar.gz |
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.
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r-- | sql/sql_truncate.cc | 1 |
1 files changed, 1 insertions, 0 deletions
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); |