summaryrefslogtreecommitdiff
path: root/mysql-test/include/concurrent.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/concurrent.inc')
-rw-r--r--mysql-test/include/concurrent.inc20
1 files changed, 11 insertions, 9 deletions
diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc
index c6d8775af6b..369b729a87c 100644
--- a/mysql-test/include/concurrent.inc
+++ b/mysql-test/include/concurrent.inc
@@ -64,6 +64,7 @@ drop table if exists t1;
--echo **
--echo ** two UPDATE's running and both changing distinct result sets
--echo **
+--disable_view_protocol
connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
@@ -149,7 +150,6 @@ drop table if exists t1;
connection default;
drop table t1;
-
--echo
--echo **
--echo ** two UPDATE's running and one changing result set
@@ -237,7 +237,7 @@ drop table t1;
connection default;
drop table t1;
-
+--enable_view_protocol
--echo
--echo **
@@ -315,8 +315,9 @@ drop table t1;
--echo ** Begin a new transaction on thread 2
begin;
--echo ** Select a range for update.
+ --disable_view_protocol
select * from t1 where tipo=2 FOR UPDATE;
-
+ --enable_view_protocol
connection thread1;
--echo ** Begin a new transaction on thread 1
begin;
@@ -355,6 +356,7 @@ drop table t1;
--echo **
--echo ** one UPDATE not changing result set and SELECT ... FOR UPDATE
--echo **
+--disable_view_protocol
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
@@ -378,7 +380,6 @@ drop table t1;
begin;
--echo ** Starting SELECT .. FOR UPDATE
select * from t1 where tipo=2 FOR UPDATE;
-
connection thread1;
--echo
--echo ** Starting new transaction on thread 1
@@ -448,14 +449,15 @@ drop table t1;
--echo ** Begin a new transaction on thread 2
begin;
select * from t1 where tipo=2 FOR UPDATE;
-
connection thread1;
--echo ** Begin a new transaction on thread 1
begin;
--echo ** Selecting a range for update by table scan will be blocked
--echo ** because of on-going transaction on thread 2.
+ --disable_view_protocol
--error ER_LOCK_WAIT_TIMEOUT
- select * from t1 where tipo=1 FOR UPDATE;
+ select * from t1 where tipo=1 FOR UPDATE;
+ --enable_view_protocol
connection thread2;
--echo ** Table will be unchanged and the select command will not be
@@ -478,7 +480,7 @@ drop table t1;
connection default;
drop table t1;
-
+--enable_view_protocol
--echo
--echo **
@@ -564,7 +566,7 @@ drop table t1;
# succeding update in the following thread. Also the used status variables '%lock%' and
# 'innodb_deleted_rows' and infos in processlist where not sucessful.
sleep 1;
-
+ --disable_view_protocol
connection thread1;
begin;
--echo ** Update on t1 will cause a table scan which will be blocked because
@@ -587,7 +589,7 @@ drop table t1;
reap;
select * from t1;
send commit;
-
+--enable_view_protocol
connection thread1;
commit;