summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-08-29 14:54:32 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-08-29 14:54:32 +0300
commit385ef618e8a7e45b6087eadd30426d60b529e354 (patch)
tree0d651aab882e733173d9b36d8ebc0c9e9d5475a8 /sql/item_create.cc
parentd3291762c35428657e9a3a99f9284e68e90f7257 (diff)
downloadmariadb-git-385ef618e8a7e45b6087eadd30426d60b529e354.tar.gz
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
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc2
1 files changed, 2 insertions, 0 deletions
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();
}