Skip to content

Commit 19fe10c

Browse files
committed
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).
1 parent a350e53 commit 19fe10c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/handler.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,8 @@ int ha_commit_trans(THD *thd, bool all)
12381238

12391239
uint rw_ha_count= ha_check_and_coalesce_trx_read_only(thd, ha_info, all);
12401240
/* rw_trans is TRUE when we in a transaction changing data */
1241-
bool rw_trans= is_real_trans && (rw_ha_count > 0);
1241+
bool rw_trans= is_real_trans &&
1242+
(rw_ha_count > !thd->is_current_stmt_binlog_disabled());
12421243
MDL_request mdl_request;
12431244

12441245
if (rw_trans)

0 commit comments

Comments
 (0)