diff options
-rw-r--r-- | sql/rpl_gtid.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc index d0f5694fb5a..83b1b402272 100644 --- a/sql/rpl_gtid.cc +++ b/sql/rpl_gtid.cc @@ -489,8 +489,12 @@ rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_STRING *out_tablename) Ha_trx_info *ha_info= thd->transaction.all.ha_list; while (ha_info) { - void *trx_hton= ha_info->ht(); + void *trx_hton; table_entry= list; + + if (!ha_info->is_trx_read_write()) + continue; + trx_hton= ha_info->ht(); while (table_entry) { if (table_entry->table_hton == trx_hton) |