Commit 61bd5d0f authored by unknown's avatar unknown

Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt

into  magare.gmz:/home/kgeorge/mysql/autopush/B31866-5.1-opt

parents aaa1c321 124af3f8
...@@ -1978,3 +1978,9 @@ a ...@@ -1978,3 +1978,9 @@ a
1 1
drop table table_25411_a; drop table table_25411_a;
drop table table_25411_b; drop table table_25411_b;
DROP TRIGGER IF EXISTS trg;
Warnings:
Note 1360 Trigger does not exist
SHOW CREATE TRIGGER trg;
ERROR HY000: Trigger does not exist
End of 5.1 tests.
...@@ -2246,3 +2246,15 @@ select * from table_25411_a; ...@@ -2246,3 +2246,15 @@ select * from table_25411_a;
drop table table_25411_a; drop table table_25411_a;
drop table table_25411_b; drop table table_25411_b;
#
# Bug #31866: MySQL Server crashes on SHOW CREATE TRIGGER statement
#
--disable-warnings
DROP TRIGGER IF EXISTS trg;
--enable-warnings
--error ER_TRG_DOES_NOT_EXIST
SHOW CREATE TRIGGER trg;
--echo End of 5.1 tests.
...@@ -6862,6 +6862,9 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name) ...@@ -6862,6 +6862,9 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name)
{ {
TABLE_LIST *lst= get_trigger_table(thd, trg_name); TABLE_LIST *lst= get_trigger_table(thd, trg_name);
if (!lst)
return TRUE;
/* /*
Open the table by name in order to load Table_triggers_list object. Open the table by name in order to load Table_triggers_list object.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment