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

Bug#21801 SQL exception handlers and warnings

The problem is that deprecated syntax warnings were not being
suppressed when the stored routine is being parsed for the first
execution. It's doesn't make sense to print out deprecated
syntax warnings when the routine is being executed because this
kind of warning only matters when the routine is being created.

The solution is to suppress deprecated syntax warnings when
parsing the stored routine for loading into the cache (might
mean that the routine is being executed for the first time).


mysql-test/r/sp-error.result:
  Add test case result for Bug#21801
mysql-test/t/sp-error.test:
  Add test case for Bug#21801
sql/sp.cc:
  Implement a internal error handler to catch deprecated
  syntax warnings when loading a stored procedure into the
  cache.
This commit is contained in:
unknown
2008-02-04 16:39:55 -02:00
parent 7d5a858d2c
commit ff8651c4ec
3 changed files with 58 additions and 1 deletions

View File

@ -1627,3 +1627,14 @@ end loop label1;
end loop;
end|
ERROR 42000: End-label label1 without match
drop procedure if exists p1;
create procedure p1()
begin
create table t1 (a int) type=MyISAM;
drop table t1;
end|
Warnings:
Warning 1287 The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 5.2. Please use 'ENGINE=storage_engine' instead
call p1();
call p1();
drop procedure p1;