summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-03 20:39:47 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-03 20:39:47 +0200
commit19fe10c3e9609d48c1240667e4400395dd8e9a3b (patch)
tree5f9130ae050417d2012d64aedaef5dbcd0288c9b
parenta350e53b611f436ad7ac618d6fde777dd457a3fe (diff)
downloadmariadb-git-19fe10c3e9609d48c1240667e4400395dd8e9a3b.tar.gz
MDEV-6581 Writing to TEMPORARY TABLE not possible in read-only
don't mark transactions read-write if no real storage engine is affected (only binlog writes).
-rw-r--r--sql/handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index d528c0aea7a..5fc75602039 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1238,7 +1238,8 @@ int ha_commit_trans(THD *thd, bool all)
uint rw_ha_count= ha_check_and_coalesce_trx_read_only(thd, ha_info, all);
/* rw_trans is TRUE when we in a transaction changing data */
- bool rw_trans= is_real_trans && (rw_ha_count > 0);
+ bool rw_trans= is_real_trans &&
+ (rw_ha_count > !thd->is_current_stmt_binlog_disabled());
MDL_request mdl_request;
if (rw_trans)