1
0
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).


mysql-test/r/trigger.result:
  Since we are using open_ltable() now to open table for trigger creation, code
  for error when we try to create trigger on view has changed to equivalent one.
  Added test for bug #11889 "Server crashes when dropping trigger using stored
  routine".
mysql-test/t/trigger.test:
  Since we are using open_ltable() now to open table for trigger creation, code
  for error when we try to create trigger on view has changed to equivalent one.
  Added test for bug #11889 "Server crashes when dropping trigger using stored
  routine".
sql/sql_trigger.cc:
  mysql_create_or_drop_trigger():
    It is better to open only table for which we are going to create or drop
    trigger with open_ltable() since we don't really need working prelocking
    in this case.
This commit is contained in:
unknown
2005-07-13 23:51:09 +04:00
parent 7001961e25
commit 4c197d99a1
3 changed files with 11 additions and 5 deletions

View File

@ -297,7 +297,7 @@ drop trigger t1.trg;
ERROR HY000: Trigger does not exist
create view v1 as select * from t1;
create trigger trg before insert on v1 for each row set @a:=1;
ERROR HY000: Trigger's 'v1' is view or temporary table
ERROR HY000: 'test.v1' is not BASE TABLE
drop view v1;
drop table t1;
create temporary table t1 (i int);
@ -578,4 +578,5 @@ create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
drop function bug5893;
update t1 set col2 = 4;
ERROR 42000: FUNCTION test.bug5893 does not exist
drop trigger t1.t1_bu;
drop table t1;