From a5c60b3f29953e9da891ca39a709cff23f2fa1d5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 14:12:32 +0200 Subject: Bug#25482 GRANT statements are not replicated if you use "replicate-ignore-table" - GRANT and REVOKE statments didn't have the "updating" flag set and thus statements with a table specified would not replicate if slave filtering rules where turned on. For example "GRANT ... ON test.t1 TO ..." would not replicate. mysql-test/r/rpl_ignore_table.result: Add test results mysql-test/t/rpl_ignore_table.test: Add tests sql/sql_yacc.yy: Pass option TL_OPTION_UPDATING to 'add_table_to_list' when parsing a GRANT or REVOKE and a table specifier is found. This will set the property "updating" on the table and thus the slave filtering rules will be applied. Without setting updating the statement will be not replicated - since "it's not updating anything" - an optimization to quickly skip SELECT's and similar. --- sql/sql_yacc.yy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_yacc.yy') diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ee57a4d611c..b72caac46a0 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -5926,7 +5926,8 @@ opt_table: | table_ident { LEX *lex=Lex; - if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL,0)) + if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL, + TL_OPTION_UPDATING)) YYABORT; if (lex->grant == GLOBAL_ACLS) lex->grant = TABLE_ACLS & ~GRANT_ACL; -- cgit v1.2.1