diff options
author | unknown <mats@kindahl-laptop.dnsalias.net> | 2007-10-31 21:09:52 +0100 |
---|---|---|
committer | unknown <mats@kindahl-laptop.dnsalias.net> | 2007-10-31 21:09:52 +0100 |
commit | cc0e54656714fec37cd74e03fe781f7571ed194e (patch) | |
tree | 8e6ca778cac4f9a416a5cee91ed25935efd4ecc1 /sql/sql_yacc.yy | |
parent | fcff3b5a8d5db3ff0c8f9b3cbfc5645c81ca4c48 (diff) | |
download | mariadb-git-cc0e54656714fec37cd74e03fe781f7571ed194e.tar.gz |
BUG#28086 (SBR of USER() becomes corrupted on slave):
Marking statements containing USER() or CURRENT_USER() as unsafe, causing
them to switch to using row-based logging in MIXED mode and generate a
warning in STATEMENT mode.
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
Result change.
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
Adding test to check that USER() and CURRENT_USER() cause a switch
to row-based logging.
sql/sql_yacc.yy:
Setting statements containing USER() or CURRENT_USER() to be unsafe.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 109e8f5434f..bb25d9c4c7f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -6745,6 +6745,7 @@ function_call_keyword: | CURRENT_USER optional_braces { $$= new (YYTHD->mem_root) Item_func_current_user(Lex->current_context()); + Lex->set_stmt_unsafe(); Lex->safe_to_cache_query= 0; } | DATE_SYM '(' expr ')' @@ -6790,6 +6791,7 @@ function_call_keyword: | USER '(' ')' { $$= new (YYTHD->mem_root) Item_func_user(); + Lex->set_stmt_unsafe(); Lex->safe_to_cache_query=0; } | YEAR_SYM '(' expr ')' |