1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2004-07-22 16:04:30 +03:00
parent d3558dc3fd
commit 48ea6e3be1
4 changed files with 21 additions and 2 deletions

View File

@ -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;

View File

@ -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;