1
0
mirror of https://github.com/MariaDB/server.git synced 2025-04-18 21:44:20 +03:00

MDEV-36476 MDEV-35452 Disable view protocol for spider tests where thread metadata could prevent lock wait timeout

In spider/bugfix.mdev_29352, with flush tables with read lock,
statements blocked in THD::has_read_only_protection() by checking
THD::global_read_lock could result in view protocol to "hang" waiting
for acquiring mdl in another THD.

In spider/bugfix.mdev_34555, within an XA transaction, statements
blocked by trans_check() by checking thd->transaction->xid_state could
result in view protocol to "hang" for the same reason.

Therefore we disable view protocol for relevant statements in these
tests.
This commit is contained in:
Yuchen Pei 2025-04-16 17:31:39 +10:00
parent f5ada42490
commit 70bca0ebf2
No known key found for this signature in database
GPG Key ID: 3DD1B35105743563
2 changed files with 4 additions and 0 deletions

View File

@ -4,7 +4,9 @@ FLUSH TABLES WITH READ LOCK;
--error ER_CANT_UPDATE_WITH_READLOCK
CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
--disable_view_protocol
SELECT * FROM t;
--enable_view_protocol
--source include/restart_mysqld.inc

View File

@ -9,6 +9,7 @@ OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE '',user 'Spider', password 'foo');
CREATE TABLE tSpider (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"';
CREATE TABLE t2 (c INT,c2 CHAR(1)) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"';
XA START 'a';
--disable_view_protocol
--disable_result_log
--error 0,ER_CONNECT_TO_FOREIGN_DATA_SOURCE
SELECT * FROM information_schema.table_constraints;
@ -22,6 +23,7 @@ SELECT * FROM t2;
SELECT SLEEP (1);
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
SELECT * FROM t2;
--enable_view_protocol
xa end 'a';
xa rollback 'a';
drop table tSpider, t2;