diff options
author | Monty <monty@mariadb.org> | 2018-05-22 16:38:02 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-05-22 18:33:18 +0300 |
commit | d6976a7e52a687d5d1da903d2879bd48cca399d5 (patch) | |
tree | c0495c7baf9a55a1bba14d32b36fbd839525bac6 /sql | |
parent | 14e5db6fadfe52399ab103feaf38d8b005caba32 (diff) | |
download | mariadb-git-d6976a7e52a687d5d1da903d2879bd48cca399d5.tar.gz |
MDEV-16234 CREATE TABLE .. SELECT LASTVAL breaks replication
Fixed by marking NEXTVAL() and LASTVAL() to be replicated row based
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_lex.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 47557d562a8..db7e8e09be4 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -6791,6 +6791,7 @@ Item *LEX::create_item_func_nextval(THD *thd, Table_ident *table_ident) TL_WRITE_ALLOW_WRITE, MDL_SHARED_WRITE)))) return NULL; + thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); return new (thd->mem_root) Item_func_nextval(thd, table); } @@ -6803,6 +6804,7 @@ Item *LEX::create_item_func_lastval(THD *thd, Table_ident *table_ident) TL_READ, MDL_SHARED_READ)))) return NULL; + thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); return new (thd->mem_root) Item_func_lastval(thd, table); } |