From 385ef618e8a7e45b6087eadd30426d60b529e354 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 Aug 2007 14:54:32 +0300 Subject: Bug #30244: row_count/found_rows does not replicate well The functions ROW_COUNT/FOUND_ROWS are indeed not safe to be used in statement based replication. Added code to declare them as such and switch the statement they're in to row based logging for mixed mode. sql/item_create.cc: Bug #30244: row_count/found_rows does not replicate well - add the functions to the set of "unsafe functions" for statement based replication mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result: BitKeeper file /home/kgeorge/mysql/work/B30244-5.1-opt/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test: BitKeeper file /home/kgeorge/mysql/work/B30244-5.1-opt/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test --- sql/item_create.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/item_create.cc') diff --git a/sql/item_create.cc b/sql/item_create.cc index fa15b992e5c..4c8dbd267b4 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -3339,6 +3339,7 @@ Create_func_found_rows Create_func_found_rows::s_singleton; Item* Create_func_found_rows::create(THD *thd) { + thd->lex->set_stmt_unsafe(); thd->lex->safe_to_cache_query= 0; return new (thd->mem_root) Item_func_found_rows(); } @@ -4234,6 +4235,7 @@ Create_func_row_count Create_func_row_count::s_singleton; Item* Create_func_row_count::create(THD *thd) { + thd->lex->set_stmt_unsafe(); thd->lex->safe_to_cache_query= 0; return new (thd->mem_root) Item_func_row_count(); } -- cgit v1.2.1