diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-01-28 12:41:14 -0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-01-28 12:41:14 -0200 |
commit | d6ab925c5e10acc72cddbaf910d9aa4bee305c82 (patch) | |
tree | bcdabefe8c705f9ea6c0632a0f9abb92dcc3060b /sql/sp_cache.cc | |
parent | e024afac6acab5203758a3b79a51fc4d661cee5b (diff) | |
download | mariadb-git-d6ab925c5e10acc72cddbaf910d9aa4bee305c82.tar.gz |
Bug#50423: Crash on second call of a procedure dropping a trigger
The problem was that a DROP TRIGGER statement inside a stored
procedure could cause a crash in subsequent invocations. This
was due to the addition, on the first execution, of a temporary
table reference to the stored procedure query table list. In
a subsequent invocation, there would be a attempt to reinitialize
the temporary table reference, which by then was already gone.
The solution is to backup and reset the query table list each
time a trigger needs to be dropped. This ensures that any temp
changes to the query table list are discarded. It is safe to
do so at this time as drop trigger is restricted from more
complicated scenarios (ie, not allowed within stored functions,
etc).
mysql-test/r/sp-bugs.result:
Add test case result for Bug#50423
mysql-test/t/sp-bugs.test:
Add test case for Bug#50423
sql/sql_trigger.cc:
Backup and reset the query table list.
Remove now unnecessary manual reset of the query table list.
Diffstat (limited to 'sql/sp_cache.cc')
0 files changed, 0 insertions, 0 deletions