From 0e19aa9e4e62b7f21302bd4aecc79709d4c9614e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Apr 2006 12:50:12 +0300 Subject: [PATCH] #BUG18715 create view with replicate*ignore-table Fixed in parser. rpl_view gained no changes but rpl_view-slave.opt. sql/sql_yacc.yy: UPDATING option for create/alter view is added for tables_ok to finds the view's TABLE_LIST.updating as true. FIXME: Regarding to UPDATING option `create view' should not have any difference from `create table'. mysql-test/t/rpl_view-slave.opt: The option is needed to force slave executes tables_ok which must return OK in conditions of this tests (no table foo is used. --- mysql-test/t/rpl_view-slave.opt | 5 +++++ sql/sql_yacc.yy | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 mysql-test/t/rpl_view-slave.opt diff --git a/mysql-test/t/rpl_view-slave.opt b/mysql-test/t/rpl_view-slave.opt new file mode 100644 index 00000000000..55b3aeb3bda --- /dev/null +++ b/mysql-test/t/rpl_view-slave.opt @@ -0,0 +1,5 @@ +# +# BUG18715 create view with replicate*ignore-table +# The option is needed to force slave executes tables_ok +# which must return OK in conditions of this tests (no table foo is used) +--replicate-ignore-table=test.foo diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ddc267eb970..e566fdf7241 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3390,7 +3390,7 @@ alter: lex->sql_command= SQLCOM_CREATE_VIEW; lex->create_view_mode= VIEW_ALTER; /* first table in list is target VIEW name */ - lex->select_lex.add_table_to_list(thd, $6, NULL, 0); + lex->select_lex.add_table_to_list(thd, $6, NULL, TL_OPTION_UPDATING); } view_list_opt AS view_select view_check_option {} @@ -9025,7 +9025,7 @@ view_tail: LEX *lex= thd->lex; lex->sql_command= SQLCOM_CREATE_VIEW; /* first table in list is target VIEW name */ - if (!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)) + if (!lex->select_lex.add_table_to_list(thd, $3, NULL, TL_OPTION_UPDATING)) YYABORT; } view_list_opt AS view_select view_check_option