1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed BUG#10969: Stored procedures: crash if default() function

Return an error if default() is used on a local variable.
  This is actaully a side-effect of BUG#5967: Stored procedure declared
  variable used instead of column (to be fixed later), so this is really a
  workaround until that is fixed.


mysql-test/r/sp-error.result:
  New test case for BUG#10969.
mysql-test/t/sp-error.test:
  New test case for BUG#10969.
sql/item.h:
  Get name of local variable for error messages.
sql/sql_yacc.yy:
  Return an error if default() is applied on a local SP variable.
This commit is contained in:
unknown
2005-06-01 15:42:40 +02:00
parent 77bd9d36e6
commit ae28b3bd07
4 changed files with 55 additions and 1 deletions

View File

@ -658,4 +658,17 @@ create procedure bug9529_9012345678901234567890123456789012345678901234567890123
begin
end|
ERROR 42000: Identifier name 'bug9529_90123456789012345678901234567890123456789012345678901234567890' is too long
drop procedure if exists bug10969|
create procedure bug10969()
begin
declare s1 int default 0;
select default(s1) from t30;
end|
ERROR 42000: Incorrect column name 's1'
create procedure bug10969()
begin
declare s1 int default 0;
select default(t30.s1) from t30;
end|
drop procedure bug10969|
drop table t1|