diff options
Diffstat (limited to 'mysql-test/include/concurrent.inc')
-rw-r--r-- | mysql-test/include/concurrent.inc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc index 5425f144d1d..0a49ae13d4b 100644 --- a/mysql-test/include/concurrent.inc +++ b/mysql-test/include/concurrent.inc @@ -55,6 +55,7 @@ GRANT USAGE ON test.* TO mysqltest@localhost; --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 @@ -140,7 +141,6 @@ GRANT USAGE ON test.* TO mysqltest@localhost; connection default; drop table t1; - --echo --echo ** --echo ** two UPDATE's running and one changing result set @@ -228,7 +228,7 @@ drop table t1; connection default; drop table t1; - +--enable_view_protocol --echo --echo ** @@ -306,8 +306,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; @@ -346,6 +347,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 @@ -369,7 +371,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 @@ -439,14 +440,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 @@ -469,7 +471,7 @@ drop table t1; connection default; drop table t1; - +--enable_view_protocol --echo --echo ** @@ -555,7 +557,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 @@ -578,7 +580,7 @@ drop table t1; reap; select * from t1; send commit; - +--enable_view_protocol connection thread1; commit; |