diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc index 4783fb763c8..05ac79a8f64 100644 --- a/sql/rpl_gtid.cc +++ b/sql/rpl_gtid.cc @@ -210,6 +210,7 @@ rpl_slave_state::truncate_state_table(THD *thd) { table= tlist.table; table->no_replicate= 1; + table->s->is_gtid_slave_pos= TRUE; // TEMPORARY CODE err= table->file->ha_truncate(); if (err) @@ -346,6 +347,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id, goto end; table->no_replicate= 1; + table->s->is_gtid_slave_pos= TRUE; // TEMPORARY CODE if (!in_transaction) thd->variables.option_bits&= ~(ulonglong)(OPTION_NOT_AUTOCOMMIT|OPTION_BEGIN); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ed394641739..f215073ef15 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5001,7 +5001,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx", table->table_name, flags)); - if (table->table->no_replicate) + if (table->table->no_replicate && !table->table->s->is_gtid_slave_pos) { /* The statement uses a table that is not replicated. diff --git a/sql/table.cc b/sql/table.cc index 4aa09e87dc9..26bbb5d046c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -315,6 +315,8 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name, strmov(share->path.str, path); share->normalized_path.str= share->path.str; share->normalized_path.length= path_length; + /* TEMPORARY FIX: if true, this means this is mysql.gtid_slave_pos table */ + share->is_gtid_slave_pos= FALSE; share->table_category= get_table_category(& share->db, & share->table_name); share->set_refresh_version(); share->open_errno= ENOENT; diff --git a/sql/table.h b/sql/table.h index 9079d6fa847..85beb808e3c 100644 --- a/sql/table.h +++ b/sql/table.h @@ -644,6 +644,8 @@ struct TABLE_SHARE LEX_STRING normalized_path; /* unpack_filename(path) */ LEX_STRING connect_string; + bool is_gtid_slave_pos; + /* Set of keys in use, implemented as a Bitmap. Excludes keys disabled by ALTER TABLE ... DISABLE KEYS.