--- mysql-5.5.15/sql/sql_yacc.yy 2011-07-13 21:09:03.000000000 +0200 +++ mysql-5.5.15-patched/sql/sql_yacc.yy 2011-10-05 14:20:54.434894955 +0200 @@ -781,10 +781,10 @@ %pure_parser /* We have threads */ /* - Currently there are 168 shift/reduce conflicts. + Currently there are 175 shift/reduce conflicts. We should not introduce new conflicts any more. */ -%expect 168 +%expect 175 /* Comments for TOKENS. @@ -1505,7 +1505,7 @@ %type join_table_list join_table - table_factor table_ref esc_table_ref + table_factor table_ref select_derived derived_table_list select_derived_union @@ -9104,7 +9104,7 @@ } ; -/* Equivalent to in the SQL:2003 standard. */ +/* Equivalent to
in the SQL:2003 standard plus ODBC escapes */ /* Warning - may return NULL in case of incomplete SELECT */ table_ref: table_factor { $$=$1; } @@ -9114,29 +9114,25 @@ if (!($$= lex->current_select->nest_last_join(lex->thd))) MYSQL_YYABORT; } + /* + The ODBC escape syntax for Outer Join is: '{' OJ join_table '}' + The parser does not define OJ as a token, any ident is accepted + instead in $2 (ident). Also, all productions from table_ref can + be escaped, not only join_table. Both syntax extensions are safe + and are ignored. + */ + | '{' ident table_ref '}' { $$=$3; } ; join_table_list: derived_table_list { MYSQL_YYABORT_UNLESS($$=$1); } ; -/* - The ODBC escape syntax for Outer Join is: '{' OJ join_table '}' - The parser does not define OJ as a token, any ident is accepted - instead in $2 (ident). Also, all productions from table_ref can - be escaped, not only join_table. Both syntax extensions are safe - and are ignored. -*/ -esc_table_ref: - table_ref { $$=$1; } - | '{' ident table_ref '}' { $$=$3; } - ; - /* Equivalent to
in the SQL:2003 standard. */ /* Warning - may return NULL in case of incomplete SELECT */ derived_table_list: - esc_table_ref { $$=$1; } - | derived_table_list ',' esc_table_ref + table_ref { $$=$1; } + | derived_table_list ',' table_ref { MYSQL_YYABORT_UNLESS($1 && ($$=$3)); }