mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mockturtle.local:/home/dlenev/src/mysql-5.0-bg20670-2 mysql-test/r/trigger.result: Auto merged mysql-test/t/trigger.test: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/sql_update.cc: Auto merged
This commit is contained in:
@ -1173,4 +1173,16 @@ TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2;
|
||||
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
drop table if exists t1;
|
||||
create table t1 (i int, j int key);
|
||||
insert into t1 values (1,1), (2,2), (3,3);
|
||||
create trigger t1_bu before update on t1 for each row
|
||||
set new.j = new.j + 10;
|
||||
update t1 set i= i+ 10 where j > 2;
|
||||
select * from t1;
|
||||
i j
|
||||
1 1
|
||||
2 2
|
||||
13 13
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@ -1421,4 +1421,23 @@ DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
|
||||
#
|
||||
# Bug#20670 "UPDATE using key and invoking trigger that modifies
|
||||
# this key does not stop"
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1 (i int, j int key);
|
||||
insert into t1 values (1,1), (2,2), (3,3);
|
||||
create trigger t1_bu before update on t1 for each row
|
||||
set new.j = new.j + 10;
|
||||
# This should not work indefinitely and should cause
|
||||
# expected result
|
||||
update t1 set i= i+ 10 where j > 2;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user