Skip to content

Commit

Permalink
MDEV-6581 Writing to TEMPORARY TABLE not possible in read-only
Browse files Browse the repository at this point in the history
don't mark transactions read-write if no real storage engine is affected (only binlog writes).
  • Loading branch information
vuvova committed Aug 3, 2016
1 parent a350e53 commit 19fe10c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 19fe10c

Please sign in to comment.