mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
MDEV-36477 MDEV-35452 Fix Spider tests with view protocol fail with "Failed to drop view: 0: "
The failure is caused by exec $stmt where $stmt has two queries. mtr with view protocol transforms the first query into a view, leaving the second query executed in the usual way. mtr being oblivious about the second query then does not handle its results, resulting in CR_COMMANDS_OUT_OF_SYNC. We disable view protocol for such edge cases. After fixing these "Failed to drop view: 0: " further failures emerge from two of the tests, which are the same problem as MDEV-36454, so we fix them to by disabling view protocol for the relevant SELECTs.
This commit is contained in:
parent
d3c5c47e0e
commit
9089a75b7f
5 changed files with 14 additions and 8 deletions
|
|
@ -43,8 +43,6 @@ let $CHILD2_1_CREATE_TABLES=
|
|||
PRIMARY KEY(a,b)
|
||||
) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
|
||||
--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
|
||||
let $CHILD2_1_SELECT_TABLES=
|
||||
SELECT pkey, txt FROM tbl_a ORDER BY pkey;
|
||||
let $CHILD2_1_SELECT_TABLES=
|
||||
SELECT a, b, c FROM ta_r2 ORDER BY a $STR_SEMICOLON
|
||||
SELECT a, b, c FROM ta_r3 ORDER BY a;
|
||||
|
|
|
|||
|
|
@ -58,25 +58,33 @@ TRUNCATE TABLE mysql.general_log;
|
|||
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt2) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2);
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt3) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2);
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1,pt3);
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt2,pt3);
|
||||
--enable_ps2_protocol
|
||||
|
||||
--connection child2_1
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
--disable_ps2_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
--disable_ps_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo
|
||||
--echo deinit
|
||||
|
|
|
|||
|
|
@ -85,10 +85,10 @@ SET NAMES utf8;
|
|||
--disable_ps2_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
--disable_ps_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo
|
||||
--echo deinit
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),(
|
|||
--connection child2_1
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
|
||||
--disable_view_protocol
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
|
||||
|
|
@ -67,11 +68,10 @@ SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
|
|||
|
||||
--connection child2_1
|
||||
--disable_ps_protocol
|
||||
--disable_view_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_view_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo
|
||||
--echo deinit
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
|
|||
--disable_ps_protocol
|
||||
--disable_view_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_view_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_view_protocol
|
||||
--enable_ps_protocol
|
||||
|
||||
--echo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue