mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Now when we create or drop trigger we will open only subject table and not
all tables suggested by prelocking algorithm. Added test for bug #11889 "Server crashes when dropping trigger using stored routine" (which was fixed by previous patch).
This commit is contained in:
@ -69,7 +69,10 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
|
||||
But do we want this ?
|
||||
*/
|
||||
|
||||
if (open_and_lock_tables(thd, tables))
|
||||
/* We should have only one table in table list. */
|
||||
DBUG_ASSERT(tables->next_global == 0);
|
||||
|
||||
if (!(table= open_ltable(thd, tables, tables->lock_type)))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/*
|
||||
@ -80,8 +83,6 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
|
||||
if (check_global_access(thd, SUPER_ACL))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
table= tables->table;
|
||||
|
||||
/*
|
||||
We do not allow creation of triggers on views or temporary tables.
|
||||
We have to do this check here and not in
|
||||
|
Reference in New Issue
Block a user