summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r--sql/sql_sequence.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index a5676b8989a..f41221e11de 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -580,7 +580,6 @@ void sequence_definition::adjust_values(longlong next_value)
int sequence_definition::write_initial_sequence(TABLE *table)
{
int error;
- THD *thd= table->in_use;
MY_BITMAP *save_write_set;
store_fields(table);
@@ -588,15 +587,14 @@ int sequence_definition::write_initial_sequence(TABLE *table)
table->s->sequence->copy(this);
/*
Sequence values will be replicated as a statement
- like 'create sequence'. So disable binary log temporarily
+ like 'create sequence'. So disable row logging for this table & statement
*/
- tmp_disable_binlog(thd);
+ table->file->row_logging= table->file->row_logging_init= 0;
save_write_set= table->write_set;
table->write_set= &table->s->all_set;
table->s->sequence->initialized= SEQUENCE::SEQ_IN_PREPARE;
error= table->file->ha_write_row(table->record[0]);
table->s->sequence->initialized= SEQUENCE::SEQ_UNINTIALIZED;
- reenable_binlog(thd);
table->write_set= save_write_set;
if (unlikely(error))
table->file->print_error(error, MYF(0));