summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-01-25 21:40:42 +0200
committerMichael Widenius <monty@askmonty.org>2013-01-25 21:40:42 +0200
commitea1d5943c5aa4e66fa3f36333043dc6fed0a9d60 (patch)
tree3df5f401ad4a6d27d41b251850769cc0ea2bde57 /storage
parent32151409c13ddc09ebda7cd02fdfe40db290503e (diff)
downloadmariadb-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 'storage')
-rw-r--r--storage/maria/ha_maria.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 1278d951a16..31b903871ce 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -3042,7 +3042,10 @@ int ha_maria::create(const char *name, register TABLE *table_arg,
ha_create_info->transactional != HA_CHOICE_NO);
if (ha_create_info->options & HA_LEX_CREATE_TMP_TABLE)
+ {
create_flags|= HA_CREATE_TMP_TABLE;
+ create_info.transactional= 0;
+ }
if (ha_create_info->options & HA_CREATE_KEEP_FILES)
create_flags|= HA_CREATE_KEEP_FILES;
if (options & HA_OPTION_PACK_RECORD)