diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-23 09:19:06 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-23 09:19:06 +0300 |
commit | 5e76e234f5e1821fda291cef4cc77d3ecb4dfcfc (patch) | |
tree | a1789512e0f9c549b41e5dd3628e139f297d45f4 /mysql-test/main/parser.result | |
parent | 92014bd1c611fd27c487bcc47a7521baa435214c (diff) | |
parent | 5f2628d1eea21d9732f582b77782b072e5e04014 (diff) | |
download | mariadb-git-5e76e234f5e1821fda291cef4cc77d3ecb4dfcfc.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/main/parser.result')
-rw-r--r-- | mysql-test/main/parser.result | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result index 94808db4d9e..af564eb280d 100644 --- a/mysql-test/main/parser.result +++ b/mysql-test/main/parser.result @@ -1875,6 +1875,61 @@ ERROR 42S02: Table 'test.t1' doesn't exist SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.t1; SET STATEMENT max_statement_time=180 FOR BACKUP UNLOCK; set SQL_MODE=@save_sql_mode; +# +# MDEV-21997: Server crashes in LEX::create_item_ident_sp +# upon use of unknown identifier +# +/*! IF 1 IN ( SELECT 2 ) OR foo = 3 THEN */ SELECT 4; +ERROR 42000: Undeclared variable: foo +BEGIN NOT ATOMIC +IF (SELECT 2) OR foo = 3 THEN +SELECT 4; +END IF ; +END; +$$ +ERROR 42000: Undeclared variable: foo +# ... but if declare it then it still work +BEGIN NOT ATOMIC +DECLARE foo int; +IF (SELECT 2) OR foo = 3 THEN +SELECT 4; +END IF ; +END; +$$ +4 +4 +CASE (SELECT 2) OR foo +WHEN 1 THEN +SET @x=10; +$$ +ERROR 42000: Undeclared variable: foo +/*! WHILE (SELECT 2) OR foo */ +SET @x=10; +END WHILE; +$$ +ERROR 42000: Undeclared variable: foo +REPEAT +SET @x=10; +UNTIL (SELECT 2) OR foo +END REPEAT; +$$ +ERROR 42000: Undeclared variable: foo +FOR i IN 1..(SELECT 2) OR foo +DO +SET @x=10; +END FOR; +$$ +ERROR 42000: Undeclared variable: foo +# ... but automatic FOR variable still work +FOR i IN 1..2 +DO +SELECT i; +END FOR; +$$ +i +1 +i +2 # End of 10.4 tests # # Start of 10.5 tests |