diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-06-10 13:53:06 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-06-10 13:53:06 +0400 |
commit | b038ad856e3c8d46751b86ea295cbd5d78d01e79 (patch) | |
tree | 8d72d06ef07947130247cf8e1f6c2bafd54f7220 | |
parent | f1ab00891ad050711557c6cdc62b17fff896aed9 (diff) | |
parent | a7229e8c20a0060a7adb599c6d52f3f68fbe4f35 (diff) | |
download | mariadb-git-b038ad856e3c8d46751b86ea295cbd5d78d01e79.tar.gz |
Merge BUG#1010351 from 5.1 to 5.2
-rw-r--r-- | mysql-test/r/connect.result | 24 | ||||
-rw-r--r-- | mysql-test/t/connect.test | 30 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 1 |
3 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index 7a972f4814a..e8a09d45877 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -254,3 +254,27 @@ connect(localhost,mysqltest_nouser,,test,MASTER_PORT,MASTER_SOCKET); ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO) DROP USER mysqltest_up1@'%'; DROP USER mysqltest_up2@'%'; +# +# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore +# +create table t1 (via int); +alter table t1 add key(via); +drop table t1; +create table t1 (col1 int); +alter table t1 add via int not null; +drop table t1; +drop procedure if exists p1; +create procedure p1(x int) +foo: loop +if x = 0 then +leave foo; +end if; +select 'test'; +set x = x-1; +end loop foo| +call p1(2); +test +test +test +test +drop procedure p1; diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index e5c6e8371bf..cfe4e80fcbd 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -397,3 +397,33 @@ DROP USER mysqltest_up2@'%'; # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc + +--echo # +--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore +--echo # +create table t1 (via int); +alter table t1 add key(via); +drop table t1; + +create table t1 (col1 int); +alter table t1 add via int not null; +drop table t1; + +--disable_warnings +drop procedure if exists p1; +--enable_warnings + +delimiter |; +create procedure p1(x int) +foo: loop + if x = 0 then + leave foo; + end if; + select 'test'; + set x = x-1; +end loop foo| + +delimiter ;| +call p1(2); +drop procedure p1; + diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index dd6127f8530..6b442af1eac 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -12453,6 +12453,7 @@ keyword_sp: | WORK_SYM {} | X509_SYM {} | YEAR_SYM {} + | VIA_SYM {} ; /* Option functions */ |