1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch 'bb-10.4-all-builders' into bb-10.5-all-builders

This commit is contained in:
Lena Startseva
2022-09-26 10:24:59 +07:00
301 changed files with 2040 additions and 194 deletions

View File

@@ -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;