diff options
author | unknown <bell@sanja.is.com.ua> | 2004-07-22 16:04:30 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-07-22 16:04:30 +0300 |
commit | 48ea6e3be19987a0283ced85b7f73dccf0eb24b3 (patch) | |
tree | 55993ad220a70eee6b5bbdb29dc4b26dcbcb5c04 /mysql-test | |
parent | d3558dc3fd5039f0f8981825083a8f7e41c99562 (diff) | |
download | mariadb-git-48ea6e3be19987a0283ced85b7f73dccf0eb24b3.tar.gz |
fixed SP variables detecting (BUG#4604)
fixed error handling
mysql-test/r/view.result:
SP variables inside view test
mysql-test/t/view.test:
SP variables inside view test
sql/sql_base.cc:
fixed error messages handling
sql/sql_yacc.yy:
fixed SP variables detecting
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/view.result | 6 | ||||
-rw-r--r-- | mysql-test/t/view.test | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 1cd80b857ab..2a593f7c6df 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -977,3 +977,9 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) drop view v1; create view v1 (a,a) as select 'a','a'; ERROR 42S21: Duplicate column name 'a' +create procedure p11 () begin declare v int; create view v1 as select v; end;// +Warnings: +Warning 1310 Referring to uninitialized variable v +call p11(); +ERROR HY000: View's SELECT contains a variable or parameter +drop procedure p11; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index b6ea504bc2e..33ffa114c28 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -900,3 +900,13 @@ drop view v1; # -- error 1060 create view v1 (a,a) as select 'a','a'; + +# +# SP variables inside view test +# +delimiter //; +create procedure p11 () begin declare v int; create view v1 as select v; end;// +delimiter ;// +-- error 1350 +call p11(); +drop procedure p11; |