1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-27691: make working view-protocol

Tests with checking metadata or that cannot be run with
the view-protocol are excluded from --view-protocol.
For tests that do not allow the use of an additional connection,
the util connection is disabled with "--disable_service_connection".
Also cases with bugs for --view-protocol are disabled.
This commit is contained in:
Lena Startseva
2022-06-09 10:32:51 +07:00
parent 1dd6255ffe
commit 72ba96a48e
273 changed files with 1867 additions and 158 deletions

View File

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