Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
If query:
SELECT lock_table, COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS GROUP BY lock_table; |
replace with:
CREATE VIEW vv as SELECT lock_table, COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS GROUP BY lock_table; |
SELECT * FROM vv; |
DROP VIEW vv; |
In the next test, we get 'ER_LOCK_WAIT_TIMEOUT' instead 'ER_LOCK_DEADLOCK':
Test:
--source include/have_partition.inc
|
--source include/have_innodb.inc
|
 |
SET NAMES utf8; |
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a)) |
ENGINE=InnoDB
|
PARTITION BY RANGE (a) |
SUBPARTITION BY HASH (a) |
(PARTITION `p0``\""e` VALUES LESS THAN (100) |
(SUBPARTITION `sp0``\""e`, |
SUBPARTITION `sp1``\""e`), |
PARTITION `p1``\""e` VALUES LESS THAN (MAXVALUE) |
(SUBPARTITION `sp2``\""e`, |
SUBPARTITION `sp3``\""e`)); |
INSERT INTO `t``\""e` VALUES (0), (2), (6), (10), (14), (18), (22); |
START TRANSACTION; |
connect(con1,localhost,root,,); |
SET NAMES utf8; |
START TRANSACTION; |
connection default; |
UPDATE `t``\""e` SET a = 16 WHERE a = 0; |
connection con1; |
UPDATE `t``\""e` SET a = 8 WHERE a = 22; |
let $id_1= `SELECT CONNECTION_ID()`; |
SEND;
|
UPDATE `t``\""e` SET a = 12 WHERE a = 0; |
connection default; |
let $wait_condition= SELECT COUNT(*)=2 FROM INFORMATION_SCHEMA.INNODB_LOCKS; |
--source include/wait_condition.inc
|
--sorted_result
|
CREATE VIEW vv as SELECT lock_table, COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS |
GROUP BY lock_table; |
SELECT * FROM vv; |
DROP VIEW vv; |
--error ER_LOCK_DEADLOCK
|
UPDATE `t``\""e` SET a = 4 WHERE a = 22; |
connection con1; |
REAP;
|
ROLLBACK; |
disconnect con1;
|
connection default; |
DROP TABLE `t``\""e`; |
Actual result:
At line 36: query 'UPDATE `t``\""e` SET a = 4 WHERE a = 22' failed with wrong errno 1205: 'Lock wait timeout exceeded; try restarting transaction', instead of 1213... |
Test pass
Expected result:
Attachments
Issue Links
- is part of
-
MDEV-27691 make working view-protocol
- Open