diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 929c79b542f..2072b045563 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -271,9 +271,35 @@ insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c'); CREATE TABLE t2 (a int not null, b char (10) not null); insert into t2 values (3,'c'),(4,'d'),(5,'f'),(6,'e'); create table t3 select a,b from t1 union select a,b from t2; -create table t4 (select a,b from t1) union (select a,b from t2) limit 2; +create table t4 (select a,b from t1) union (select a,b from t2); insert into t4 select a,b from t1 union select a,b from t2; -insert into t3 (select a,b from t1) union (select a,b from t2) limit 2; +insert into t3 (select a,b from t1) union (select a,b from t2); select * from t3; +a b +1 a +2 b +3 c +4 d +5 f +6 e +1 a +2 b +3 c +4 d +5 f +6 e select * from t4; +a b +1 a +2 b +3 c +4 d +5 f +6 e +1 a +2 b +3 c +4 d +5 f +6 e drop table t1,t2,t3,t4; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index a93339a3ad6..5b20354336c 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -72,5 +72,5 @@ delete from mysql.tables_priv where user='mysqltest_1'; delete from mysql.columns_priv where user='mysqltest_1'; flush privileges; drop table t1; ---error 1054 +--error 1221 GRANT FILE on mysqltest.* to mysqltest_1@localhost; diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 5f7eba83755..dcf2f79e5bf 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -164,9 +164,9 @@ insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c'); CREATE TABLE t2 (a int not null, b char (10) not null); insert into t2 values (3,'c'),(4,'d'),(5,'f'),(6,'e'); create table t3 select a,b from t1 union select a,b from t2; -create table t4 (select a,b from t1) union (select a,b from t2) limit 2; +create table t4 (select a,b from t1) union (select a,b from t2); insert into t4 select a,b from t1 union select a,b from t2; -insert into t3 (select a,b from t1) union (select a,b from t2) limit 2; +insert into t3 (select a,b from t1) union (select a,b from t2); select * from t3; select * from t4; drop table t1,t2,t3,t4; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8b0e3dfe8d7..cf580b3f3df 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -597,7 +597,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); table_to_table_list table_to_table opt_table_list opt_as handler_rkey_function handler_read_or_scan single_multi table_wild_list table_wild_one opt_wild opt_union union_list - precision union_option + precision union_option opt_and END_OF_INPUT %type @@ -2640,9 +2640,7 @@ insert_field_spec: lex->many_values.push_back(lex->insert_list)) YYABORT; } - ident_eq_list - | select_for_insert {} - ; + ident_eq_list; opt_field_spec: /* empty */ { } @@ -2651,8 +2649,7 @@ opt_field_spec: fields: fields ',' insert_ident { Lex->field_list.push_back($3); } - | insert_ident { Lex->field_list.push_back($1); } - ; + | insert_ident { Lex->field_list.push_back($1); }; insert_values: VALUES values_list {}