diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2001-10-19 17:43:30 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2001-10-19 17:43:30 +0300 |
commit | 7b440a7326886fdd35bcf59ae048194f87cb7cdf (patch) | |
tree | 4fac432f8c94c47d262609dc9627475c5fd8e107 /sql/sql_yacc.yy | |
parent | 1211c0a75cba6b45e4b5ace6e77e8a4568d5d3dd (diff) | |
download | mariadb-git-7b440a7326886fdd35bcf59ae048194f87cb7cdf.tar.gz |
Unchecked changes, so that I could run mysql-test.
If I ruined anything, write your complaints to sasha@mysql.com
sql/sql_delete.cc:
Unchecked changes, so that I could run mysql-test
sql/sql_lex.h:
Unchecked changes, so that I could run mysql-test
sql/sql_parse.cc:
Unchecked changes, so that I could run mysql-test
sql/sql_union.cc:
Unchecked changes, so that I could run mysql-test
sql/sql_yacc.yy:
Unchecked changes, so that I could run mysql-test
BitKeeper/etc/ignore:
Added libmysqld/examples/link_sources to the ignore list
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 5dae9eeb3cb..4174e6ba345 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1340,6 +1340,13 @@ select: Lex->sql_command= SQLCOM_SELECT; } select_part2; + | + '(' SELECT_SYM + { + Lex->sql_command= SQLCOM_SELECT; + } + select_part3; + select_part2: { @@ -1349,6 +1356,15 @@ select_part2: } select_options select_item_list select_into select_lock_type union +select_part3: + { + LEX *lex=Lex; + lex->lock_option=TL_READ; + mysql_init_select(lex); + Select->braces = true; + } + select_options select_item_list select_into select_lock_type ')' union + select_into: limit_clause {} | select_from @@ -3480,7 +3496,11 @@ rollback: union: - /* empty */ {} + /* empty */ + { + if (Lex->select->braces || Select->linkage == NOT_A_SELECT) + YYABORT; + } | union_list union_list: @@ -3497,6 +3517,16 @@ union_list: lex->select->linkage=UNION_TYPE; } SELECT_SYM select_part2 + | '(' SELECT_SYM select_part3 optional_order_or_limit + +optional_order_or_limit: + /* emty */ {} + | + { + mysql_new_select(Lex); + Lex->select->linkage=NOT_A_SELECT; + } + order_clause limit_clause union_option: /* empty */ {} |