diff options
author | unknown <igor@olga.mysql.com> | 2007-06-04 03:16:17 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-06-04 03:16:17 -0700 |
commit | 5a19274ea8af855214d25069fc65fd15668e4dc6 (patch) | |
tree | c0603a0ced48aa5d4991dea80ff63566636c96fc /mysql-test/t/trigger.test | |
parent | e65eb0e44791b9ecc6457d5bec25e148eaee48e2 (diff) | |
parent | e409a8a5c0402859ec0754e5d060e3ae06df4c6e (diff) | |
download | mariadb-git-5a19274ea8af855214d25069fc65fd15668e4dc6.tar.gz |
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.1-opt-merge
include/thr_lock.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/udf_example.c:
Auto merged
mysql-test/r/subselect.result:
Manual merge.
mysql-test/t/subselect.test:
Manual merge.
sql/sql_view.cc:
Manual merge.
Diffstat (limited to 'mysql-test/t/trigger.test')
-rw-r--r-- | mysql-test/t/trigger.test | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index e63417809cc..31739f6c41b 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -1763,4 +1763,59 @@ select * from t1; select * from t3; drop table t1, t2, t3; +# +# Bug #26162: Trigger DML ignores low_priority_updates setting +# +CREATE TABLE t1 (id INTEGER); +CREATE TABLE t2 (id INTEGER); + +INSERT INTO t2 VALUES (1),(2); + +# trigger that produces the high priority insert, but should be low, adding +# LOW_PRIORITY fixes this +CREATE TRIGGER t1_test AFTER INSERT ON t1 FOR EACH ROW + INSERT INTO t2 VALUES (new.id); + +CONNECT (rl_acquirer, localhost, root,,); +CONNECT (wl_acquirer, localhost, root,,); +CONNECT (rl_contender, localhost, root,,); + +SELECT GET_LOCK('B26162',20); + +CONNECTION rl_acquirer; +--send +SELECT 'rl_acquirer', GET_LOCK('B26162',5), id FROM t2 WHERE id = 1; + +CONNECTION wl_acquirer; +SET SESSION LOW_PRIORITY_UPDATES=1; +SET GLOBAL LOW_PRIORITY_UPDATES=1; +--send +INSERT INTO t1 VALUES (5); + +CONNECTION rl_contender; +# must not "see" the row inserted by the INSERT (as it must run before the +# INSERT) +--send +SELECT 'rl_contender', id FROM t2 WHERE id > 1; + +CONNECTION default; +SELECT RELEASE_LOCK('B26162'); + +CONNECTION wl_acquirer; +--reap +CONNECTION rl_acquirer; +--reap +CONNECTION rl_contender; +--reap + +CONNECTION default; +DISCONNECT rl_acquirer; +DISCONNECT wl_acquirer; +DISCONNECT rl_contender; + +DROP TRIGGER t1_test; +DROP TABLE t1,t2; +SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; +SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; + --echo End of 5.0 tests |