summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp_notembedded.test
diff options
context:
space:
mode:
authorunknown <davi@moksha.local>2007-09-05 15:03:02 -0300
committerunknown <davi@moksha.local>2007-09-05 15:03:02 -0300
commitbfbe3350dde27a30e999a375228873a07880d5b4 (patch)
tree3b49434500f860228984002409f4b8a7e289bf4e /mysql-test/t/sp_notembedded.test
parentddf8272b756314d49065845118b322080461a2cf (diff)
downloadmariadb-git-bfbe3350dde27a30e999a375228873a07880d5b4.tar.gz
The test case for Bug#29936 doesn't work with the embedded version,
the first query is not running while we are doing wait queries on a second connection. mysql-test/r/sp.result: Remove test case result for Bug#29936, moving to sp_notembedded.result mysql-test/r/sp_notembedded.result: Test case result for Bug#29936, moved from sp.result mysql-test/t/sp.test: Remove test case for Bug#29936, moving to sp_notembedded.test mysql-test/t/sp_notembedded.test: Test case result for Bug#29936, moved from sp.test
Diffstat (limited to 'mysql-test/t/sp_notembedded.test')
-rw-r--r--mysql-test/t/sp_notembedded.test65
1 files changed, 65 insertions, 0 deletions
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test
index 6335ad55606..b5037b469ae 100644
--- a/mysql-test/t/sp_notembedded.test
+++ b/mysql-test/t/sp_notembedded.test
@@ -287,3 +287,68 @@ connection default;
drop user mysqltest_1@localhost;
drop procedure 15298_1;
drop procedure 15298_2;
+
+#
+# Bug#29936 Stored Procedure DML ignores low_priority_updates setting
+#
+
+--disable_warnings
+drop table if exists t1;
+drop procedure if exists p1;
+--enable_warnings
+
+create table t1 (value varchar(15));
+create procedure p1() update t1 set value='updated' where value='old';
+
+# load the procedure into sp cache and execute once
+call p1();
+
+insert into t1 (value) values ("old");
+
+connect (rl_holder, localhost, root,,);
+connect (rl_acquirer, localhost, root,,);
+connect (rl_contender, localhost, root,,);
+connect (rl_wait, localhost, root,,);
+
+connection rl_holder;
+select get_lock('b26162',120);
+
+connection rl_acquirer;
+--send select 'rl_acquirer', value from t1 where get_lock('b26162',120);
+
+# we must wait till this select opens and locks the tables
+connection rl_wait;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "User lock" and
+ info = "select 'rl_acquirer', value from t1 where get_lock('b26162',120)";
+--source include/wait_condition.inc
+
+connection default;
+set session low_priority_updates=on;
+--send call p1();
+
+connection rl_wait;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Locked" and
+ info = "update t1 set value='updated' where value='old'";
+--source include/wait_condition.inc
+
+connection rl_contender;
+select 'rl_contender', value from t1;
+
+connection rl_holder;
+select release_lock('b26162');
+
+connection rl_acquirer;
+--reap
+connection default;
+--reap
+
+disconnect rl_holder;
+disconnect rl_acquirer;
+disconnect rl_wait;
+drop procedure p1;
+drop table t1;
+set session low_priority_updates=default;