Commit 19fe10c3 authored by Sergei Golubchik's avatar Sergei Golubchik

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).
parent a350e53b
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment