summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorVesa Pentti <vesa.pentti@mariadb.net>2018-01-11 15:18:29 +0000
committerVesa Pentti <vesa.pentti@mariadb.net>2018-01-12 10:15:50 +0000
commitd4366c4a2c9b41901b11ca180d3ddbf79e992490 (patch)
tree24d72f6b7b3c8fc9cf5c547af5320fc41dfc87c6 /sql/handler.cc
parent84c9c8b2e9d68d7014e8b3e17e0d6df8efb3215b (diff)
downloadmariadb-git-bb-5.5-pentve.tar.gz
MDEV-14185 -- CREATE TEMPORARY TABLE AS SELECT causes error 1290 with read_only and InnoDBbb-5.5-pentve
* Did affect only transactional engines like InnoDB * Note: During table creation handler's 'table_share' is NULL * Now the transaction isn't marked rw for a temporary table when it's created
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index dc40e34bc3d..84d73458753 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3770,7 +3770,10 @@ int
handler::ha_create_handler_files(const char *name, const char *old_name,
int action_flag, HA_CREATE_INFO *info)
{
- mark_trx_read_write();
+ if (info && !(info->options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ mark_trx_read_write();
+ }
return create_handler_files(name, old_name, action_flag, info);
}