summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/concurrent.inc20
-rw-r--r--mysql-test/include/count_sessions.inc4
-rw-r--r--mysql-test/include/ctype_E05C.inc4
-rw-r--r--mysql-test/include/ctype_common.inc2
-rw-r--r--mysql-test/include/ctype_datetime.inc3
-rw-r--r--mysql-test/include/ctype_german.inc4
-rw-r--r--mysql-test/include/ctype_like_range_f1f2.inc3
-rw-r--r--mysql-test/include/ctype_myanmar.inc4
-rw-r--r--mysql-test/include/ctype_numconv.inc5
-rw-r--r--mysql-test/include/ctype_pad.inc5
-rw-r--r--mysql-test/include/ctype_str_to_date.inc3
-rw-r--r--mysql-test/include/ctype_unescape.inc3
-rw-r--r--mysql-test/include/ctype_utf8mb4.inc6
-rw-r--r--mysql-test/include/deadlock.inc10
-rw-r--r--mysql-test/include/empty_string_literal.inc18
-rw-r--r--mysql-test/include/explain_utils.inc3
-rw-r--r--mysql-test/include/func_hybrid_type.inc3
-rw-r--r--mysql-test/include/gis_debug.inc8
-rw-r--r--mysql-test/include/have_csv.inc2
-rw-r--r--mysql-test/include/have_log_bin.inc1
-rw-r--r--mysql-test/include/index_merge1.inc8
-rw-r--r--mysql-test/include/mix2.inc4
-rw-r--r--mysql-test/include/mysqlhotcopy.inc4
-rw-r--r--mysql-test/include/no_view_protocol.inc6
-rw-r--r--mysql-test/include/ps_conv.inc2
-rw-r--r--mysql-test/include/query_cache.inc3
-rw-r--r--mysql-test/include/query_cache_partitions.inc4
-rw-r--r--mysql-test/include/unsafe_binlog.inc11
-rw-r--r--mysql-test/include/update_use_source.inc3
-rw-r--r--mysql-test/include/weight_string.inc4
-rw-r--r--mysql-test/include/weight_string_8140.inc4
-rw-r--r--mysql-test/include/weight_string_8EA1.inc4
-rw-r--r--mysql-test/include/weight_string_8FA2C3.inc4
-rw-r--r--mysql-test/include/weight_string_A1A1.inc4
-rw-r--r--mysql-test/include/weight_string_chde.inc3
-rw-r--r--mysql-test/include/weight_string_euro.inc3
-rw-r--r--mysql-test/include/weight_string_l1.inc3
-rw-r--r--mysql-test/include/weight_string_l2.inc3
38 files changed, 159 insertions, 29 deletions
diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc
index c6d8775af6b..369b729a87c 100644
--- a/mysql-test/include/concurrent.inc
+++ b/mysql-test/include/concurrent.inc
@@ -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;
diff --git a/mysql-test/include/count_sessions.inc b/mysql-test/include/count_sessions.inc
index 4728e39ce74..65098e2731a 100644
--- a/mysql-test/include/count_sessions.inc
+++ b/mysql-test/include/count_sessions.inc
@@ -18,4 +18,8 @@
# Created: 2009-01-14 mleich
#
+# Tests will be skipped for the view protocol because the view protocol creates
+# an additional util connection and other statistics data
+-- source include/no_view_protocol.inc
+
let $count_sessions= query_get_value(SHOW STATUS LIKE 'Threads_connected', Value, 1);
diff --git a/mysql-test/include/ctype_E05C.inc b/mysql-test/include/ctype_E05C.inc
index 9ef35a98934..71861044664 100644
--- a/mysql-test/include/ctype_E05C.inc
+++ b/mysql-test/include/ctype_E05C.inc
@@ -81,6 +81,8 @@ DROP TABLE t1;
# even if character_set_connection is big5/cp932/gbk/sjis.
# Note, the other 0x5C which is before 0xE05C is also treated as escape.
#
+#check after fix MDEV-29290
+--disable_view_protocol
SET character_set_client=binary, character_set_results=binary;
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
SELECT HEX('à\['), HEX('\à\[');
@@ -105,7 +107,7 @@ SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
DROP TABLE t1;
-
+--enable_view_protocol
--echo # Start of ctype_E05C.inc
diff --git a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
index a39c25f2cc8..a0b3dd95451 100644
--- a/mysql-test/include/ctype_common.inc
+++ b/mysql-test/include/ctype_common.inc
@@ -67,10 +67,12 @@ drop table t1;
--echo #
--echo # MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
--echo #
+--disable_service_connection
SET character_set_client=latin1;
SET character_set_connection= @test_character_set;
SET collation_connection= @test_collation;
SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+--enable_service_connection
#
# Bug#27580 SPACE() function collation bug?
diff --git a/mysql-test/include/ctype_datetime.inc b/mysql-test/include/ctype_datetime.inc
index f4ec2e81ea3..7fab2b18c18 100644
--- a/mysql-test/include/ctype_datetime.inc
+++ b/mysql-test/include/ctype_datetime.inc
@@ -18,6 +18,8 @@ SET time_zone=default;
# TODO: remove "--disable_ps_protocol" when MDEV-5444 is fixed
--disable_ps_protocol
+#remove "--disable_view_protocol" in 10.6 version
+--disable_view_protocol
SELECT CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY);
SELECT COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY);
SELECT CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY);
@@ -55,3 +57,4 @@ SELECT * FROM t1 WHERE t = CONCAT('2001-01-08 00:00:00',LEFT(RAND(),0)) - INTERV
SELECT * FROM t1 WHERE t < TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY;
SELECT * FROM t1 WHERE t = TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY;
DROP TABLE t1;
+--enable_view_protocol
diff --git a/mysql-test/include/ctype_german.inc b/mysql-test/include/ctype_german.inc
index 0f8c995a472..3985216a8b4 100644
--- a/mysql-test/include/ctype_german.inc
+++ b/mysql-test/include/ctype_german.inc
@@ -46,6 +46,8 @@ INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C);
#
# Check order
#
+#enable after fix MDEV-29290
+--disable_view_protocol
select s1, hex(s1) from t1 order by s1, binary s1;
select group_concat(s1 order by binary s1) from t1 group by s1;
@@ -53,7 +55,7 @@ SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1);
SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1);
drop table t1;
-
+--enable_view_protocol
#
# Check filesort for 'S' and "U+00DF SHARP S",
diff --git a/mysql-test/include/ctype_like_range_f1f2.inc b/mysql-test/include/ctype_like_range_f1f2.inc
index 54ea1b4c665..def341e8d5e 100644
--- a/mysql-test/include/ctype_like_range_f1f2.inc
+++ b/mysql-test/include/ctype_like_range_f1f2.inc
@@ -17,9 +17,12 @@ INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
+#check after fix MDEV-29290
+--disable_view_protocol
# Check pattern (important for ucs2, utf16, utf32)
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
--echo 3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
DROP TABLE t1;
+--enable_view_protocol
diff --git a/mysql-test/include/ctype_myanmar.inc b/mysql-test/include/ctype_myanmar.inc
index 82dce1335a0..a305430835f 100644
--- a/mysql-test/include/ctype_myanmar.inc
+++ b/mysql-test/include/ctype_myanmar.inc
@@ -1293,7 +1293,11 @@ INSERT INTO t1 (s1) VALUES
(_ucs2 0x101C1000103A10181000103A),
(_ucs2 0x101C103910181000103A /* tea */);
+# enable view-protocol after fix MDEV-27871
+--disable_view_protocol
+
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) FROM t1 ORDER BY id;
+--enable_view_protocol
DROP TABLE t1;
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index 07298b1d47b..db9a9b7f5c0 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -1,3 +1,7 @@
+#remove this include after fix MDEV-27871
+# maybe some tests need to be excluded separately after fix
+--source include/no_view_protocol.inc
+
SET TIME_ZONE = _latin1 '+03:00';
--echo #
@@ -1631,6 +1635,7 @@ SELECT charset(@x), collation(@x);
--echo #
--echo # Bug#54916 GROUP_CONCAT + IFNULL truncates output
--echo #
+
SELECT @@collation_connection;
# ENGINE=MYISAM is very important to make sure "SYSTEM" join type
# is in use, which will create instances of Item_copy.
diff --git a/mysql-test/include/ctype_pad.inc b/mysql-test/include/ctype_pad.inc
index 4cefc575cdd..a18876145df 100644
--- a/mysql-test/include/ctype_pad.inc
+++ b/mysql-test/include/ctype_pad.inc
@@ -52,13 +52,14 @@ DROP TABLE t1;
--echo #
--echo # IF, CASE, LEAST
--echo #
-
+#enable after fix MDEV-27871
+--disable_view_protocol
eval SELECT IF('abc' COLLATE $coll = 'abc ', 'pad', 'nopad');
eval SELECT CASE 'abc' COLLATE $coll WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
eval SELECT CASE WHEN 'abc' COLLATE $coll = 'abc ' THEN 'pad' ELSE 'nopad' END;
eval SELECT HEX(LEAST('abc ' COLLATE $coll, 'abc '));
eval SELECT HEX(GREATEST('abc ' COLLATE $coll, 'abc '));
-
+--enable_view_protocol
--echo #
--echo # Collation mix
--echo #
diff --git a/mysql-test/include/ctype_str_to_date.inc b/mysql-test/include/ctype_str_to_date.inc
index 62adb05b094..fc7d6801adf 100644
--- a/mysql-test/include/ctype_str_to_date.inc
+++ b/mysql-test/include/ctype_str_to_date.inc
@@ -3,7 +3,10 @@
--echo #
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
+# enable view-protocol after fix MDEV-27871
+--disable_view_protocol
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
+--enable_view_protocol
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
diff --git a/mysql-test/include/ctype_unescape.inc b/mysql-test/include/ctype_unescape.inc
index 171843ff66a..d7a8a27509a 100644
--- a/mysql-test/include/ctype_unescape.inc
+++ b/mysql-test/include/ctype_unescape.inc
@@ -309,12 +309,15 @@ CALL p2();
--disable_warnings
# All records marked with '[BAD]' mean that the string was unescaped
# in a unexpected way, that means there is a bug in UNESCAPE() above.
+#check after fix MDEV-29290
+--disable_view_protocol
SELECT HEX(a),HEX(b),
CONCAT(unescape_type(a,b),
wellformedness(a,b),
mysql_real_escape_string_generated(a),
IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment
FROM t1 ORDER BY LENGTH(a),a;
+--enable_view_protocol
--enable_warnings
DROP TABLE t1;
DROP PROCEDURE p1;
diff --git a/mysql-test/include/ctype_utf8mb4.inc b/mysql-test/include/ctype_utf8mb4.inc
index d24ee2fafeb..436b0f2782f 100644
--- a/mysql-test/include/ctype_utf8mb4.inc
+++ b/mysql-test/include/ctype_utf8mb4.inc
@@ -1,6 +1,12 @@
#
# Tests with the utf8mb4 character set
#
+
+# Tests will be skipped for the view protocol because the view protocol uses
+# an additional util connection and don't use for this nessesary configurations
+# Also need to resolve MDEV-27871
+-- source include/no_view_protocol.inc
+
--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2;
diff --git a/mysql-test/include/deadlock.inc b/mysql-test/include/deadlock.inc
index 2fa61f48624..aa714445448 100644
--- a/mysql-test/include/deadlock.inc
+++ b/mysql-test/include/deadlock.inc
@@ -9,7 +9,7 @@
# old name was t/innodb-deadlock.test
# main code went into include/deadlock.inc
#
-
+--disable_service_connection
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
@@ -20,7 +20,7 @@ drop table if exists t1,t2;
#
# Testing of FOR UPDATE
#
-
+--disable_view_protocol
connection con1;
eval create table t1 (id integer, x integer) engine = $engine_type;
insert into t1 values(0, 0);
@@ -49,10 +49,11 @@ select * from t1;
commit;
drop table t1;
+--enable_view_protocol
#
# Testing of FOR UPDATE
#
-
+--disable_view_protocol
connection con1;
eval create table t1 (id integer, x integer) engine = $engine_type;
eval create table t2 (b integer, a integer) engine = $engine_type;
@@ -125,7 +126,7 @@ connection default;
disconnect con1;
disconnect con2;
drop table t1, t2;
-
+--enable_view_protocol
--echo End of 4.1 tests
#
@@ -152,3 +153,4 @@ drop table if exists a;
set storage_engine=default;
--echo End of 5.0 tests.
+--enable_service_connection
diff --git a/mysql-test/include/empty_string_literal.inc b/mysql-test/include/empty_string_literal.inc
index f02b626a484..9ccedde6dce 100644
--- a/mysql-test/include/empty_string_literal.inc
+++ b/mysql-test/include/empty_string_literal.inc
@@ -4,6 +4,12 @@ SET SESSION character_set_client=cp1250;
--echo #
--echo # Test litteral
--echo #
+
+#enable view protocol after fix MDEV-27871 and
+# it is necessary that the view protocol uses the same connection,
+# not util connection
+--disable_view_protocol
+
SET sql_mode=@mode;
select @@sql_mode;
SELECT '',CHARSET(''), null, CHARSET(null), CAST(null as char(10)), CHARSET(CAST(null as char(10))), 'x', CHARSET('x');
@@ -12,6 +18,8 @@ SET sql_mode=default;
SELECT '',CHARSET(''), null, CHARSET(null), CAST(null as char(10)), CHARSET(CAST(null as char(10))), 'x', CHARSET('x');
SELECT CHARSET(NULLIF('','')),NULLIF('','');
+
+
--echo #
--echo # Test NCHAR litteral
--echo #
@@ -22,6 +30,8 @@ SET sql_mode=default;
SELECT N'',CHARSET(N''), N'x', CHARSET(N'x');
SELECT CHARSET(NULLIF(N'',N'')),NULLIF(N'',N'');
+
+
--echo #
--echo # Test CHARSET prefix litteral
--echo #
@@ -52,6 +62,8 @@ SELECT '' '' '',CHARSET('' '' '');
SELECT _latin1'' '' '',CHARSET(_latin1'' '' '');
SELECT N'' '' '',CHARSET(N'' '' '');
+--enable_view_protocol
+
--echo #
--echo # UNION - implicit group by
--echo #
@@ -70,10 +82,16 @@ UNION
SELECT 1 , _cp1250 ''
ORDER BY 1;
+# it is necessary that the view protocol uses the same connection,
+# not util connection
+--disable_view_protocol
+
SELECT NULLIF(_cp1250 '',_cp1250 '')
UNION
SELECT NULLIF(N'',N'');
+--enable_view_protocol
+
--error ER_CANT_AGGREGATE_2COLLATIONS
SELECT 1 , _latin2 ''
UNION
diff --git a/mysql-test/include/explain_utils.inc b/mysql-test/include/explain_utils.inc
index 505798e432a..4333319c364 100644
--- a/mysql-test/include/explain_utils.inc
+++ b/mysql-test/include/explain_utils.inc
@@ -26,7 +26,7 @@
--echo # query: $query
--echo # select: $select
--echo #
-
+--disable_view_protocol
if ($select) {
--disable_query_log
--eval $select INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/before_explain.txt'
@@ -159,3 +159,4 @@ SHOW STATUS WHERE (Variable_name LIKE 'Sort%' OR
--enable_query_log
--echo
+--enable_view_protocol
diff --git a/mysql-test/include/func_hybrid_type.inc b/mysql-test/include/func_hybrid_type.inc
index 0eed936db38..f4da357a5fa 100644
--- a/mysql-test/include/func_hybrid_type.inc
+++ b/mysql-test/include/func_hybrid_type.inc
@@ -1,5 +1,7 @@
# "mtr --ps" returns different values in "Max length"
--disable_ps_protocol
+# view protocol createincorrect table name
+--disable_view_protocol
--enable_metadata
--vertical_results
SELECT
@@ -39,6 +41,7 @@ FROM t1;
--horizontal_results
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
CREATE TABLE t2 AS
SELECT
a AS ___________a,
diff --git a/mysql-test/include/gis_debug.inc b/mysql-test/include/gis_debug.inc
index c81932ef90c..813ae252070 100644
--- a/mysql-test/include/gis_debug.inc
+++ b/mysql-test/include/gis_debug.inc
@@ -119,6 +119,8 @@ CALL p1(-1, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,
--enable_query_log
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT ST_CONTAINS(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)'));
@@ -138,6 +140,7 @@ SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0
--echo #
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1));
+--enable_view_protocol
--echo #
--echo # Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER
@@ -145,6 +148,9 @@ SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3
DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),'');
+#enable after fix MDEV-27871
+--disable_view_protocol
+
SELECT ST_WITHIN(
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) '),
@@ -159,3 +165,5 @@ SELECT ST_NUMINTERIORRINGS(
SELECT ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))));
+
+--enable_view_protocol
diff --git a/mysql-test/include/have_csv.inc b/mysql-test/include/have_csv.inc
index 4b43d41f22f..fef2d6fa2c5 100644
--- a/mysql-test/include/have_csv.inc
+++ b/mysql-test/include/have_csv.inc
@@ -1,3 +1,5 @@
+-- source include/no_view_protocol.inc
+
disable_query_log;
--require include/true.require
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'csv';
diff --git a/mysql-test/include/have_log_bin.inc b/mysql-test/include/have_log_bin.inc
index fd5dc66e416..f8733aa7876 100644
--- a/mysql-test/include/have_log_bin.inc
+++ b/mysql-test/include/have_log_bin.inc
@@ -7,6 +7,7 @@
# source include/have_log_bin.inc;
source include/not_embedded.inc;
+-- source include/no_view_protocol.inc
if (`select not @@log_bin`) {
skip Test requires: 'have_log_bin';
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
index ebadb5077ae..74691cfe217 100644
--- a/mysql-test/include/index_merge1.inc
+++ b/mysql-test/include/index_merge1.inc
@@ -297,6 +297,10 @@ select * from t0 where key1 < 3 or key2 < 4;
select count(*) from t0;
# Test for BUG#4177
+
+# enable view-protocol after fix MDEV-27871
+--disable_view_protocol
+
drop table t4;
create table t4 (a int);
insert into t4 values (1),(4),(3);
@@ -346,6 +350,8 @@ set join_buffer_size= @save_join_buffer_size;
drop table t0, t1, t2, t3, t4;
+--enable_view_protocol
+
# BUG#16166
CREATE TABLE t1 (
cola char(3) not null, colb char(3) not null, filler char(200),
@@ -409,6 +415,7 @@ drop table t1, t2, t3;
#
# BUG#20256 - LOCK WRITE - MyISAM
#
+--disable_service_connection
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(1);
CREATE TABLE t2(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b));
@@ -437,6 +444,7 @@ INSERT INTO t2(a,b) VALUES(1,2);
SELECT t2.a FROM t1,t2 WHERE t2.b=2 AND t2.a=1;
UNLOCK TABLES;
DROP TABLE t1, t2;
+--enable_service_connection
#
# BUG#29740: HA_KEY_SCAN_NOT_ROR wasn't set for HEAP engine
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index ed06e436ead..9465d578208 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -157,7 +157,7 @@ drop table t1;
# Test of reading on secondary key with may be null
-
+--disable_view_protocol
eval create table t1 (a int,b varchar(20),key(a)) engine=$engine_type;
insert into t1 values (1,""), (2,"testing");
select * from t1 where a = 1;
@@ -289,7 +289,7 @@ drop table t1;
rename table t2 to t1;
drop table t1;
set autocommit=1;
-
+--enable_view_protocol
#
# The following simple tests failed at some point
#
diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc
index 2fc14d599d9..481ebc02622 100644
--- a/mysql-test/include/mysqlhotcopy.inc
+++ b/mysql-test/include/mysqlhotcopy.inc
@@ -23,7 +23,7 @@ if (!$MYSQLHOTCOPY)
# be skipped if Perl modules required by the mysqlhotcopy tool are not
# found when the script is run this way.
-
+--disable_service_connection
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--disable_warnings
DROP DATABASE IF EXISTS hotcopy_test;
@@ -134,4 +134,4 @@ DROP DATABASE hotcopy_test_cpy;
DROP DATABASE hotcopy_test;
DROP DATABASE hotcopy_save;
DROP DATABASE hotcopy_save_old;
-
+--enable_service_connection
diff --git a/mysql-test/include/no_view_protocol.inc b/mysql-test/include/no_view_protocol.inc
new file mode 100644
index 00000000000..9e5797835df
--- /dev/null
+++ b/mysql-test/include/no_view_protocol.inc
@@ -0,0 +1,6 @@
+# The file with expected results fits only to a run without
+# view-protocol.
+if (`SELECT $VIEW_PROTOCOL > 0`)
+{
+ --skip Test requires: view-protocol disabled
+} \ No newline at end of file
diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc
index d31f41ef39d..e84becec010 100644
--- a/mysql-test/include/ps_conv.inc
+++ b/mysql-test/include/ps_conv.inc
@@ -77,7 +77,9 @@ show create table t5 ;
--vertical_results
--enable_metadata
--disable_ps_protocol
+--disable_view_protocol
select * from t5 ;
+--enable_view_protocol
--enable_ps_protocol
--disable_metadata
--horizontal_results
diff --git a/mysql-test/include/query_cache.inc b/mysql-test/include/query_cache.inc
index fcb9c2494d4..cd99cac799c 100644
--- a/mysql-test/include/query_cache.inc
+++ b/mysql-test/include/query_cache.inc
@@ -14,7 +14,7 @@
# old name was innodb_cache.test
# main code went into include/query_cache.inc
#
-
+--disable_view_protocol
SET global query_cache_type=ON;
SET local query_cache_type=ON;
eval SET SESSION STORAGE_ENGINE = $engine_type;
@@ -191,3 +191,4 @@ set @@global.query_cache_size = @save_query_cache_size;
drop table t2;
SET global query_cache_type=default;
+--enable_view_protocol
diff --git a/mysql-test/include/query_cache_partitions.inc b/mysql-test/include/query_cache_partitions.inc
index c69356f907d..d97d9db27b0 100644
--- a/mysql-test/include/query_cache_partitions.inc
+++ b/mysql-test/include/query_cache_partitions.inc
@@ -4,6 +4,10 @@
# $engine_type -- storage engine to be tested
# have to be set before sourcing this script.
+# Tests will be skipped for the view protocol because the view protocol creates
+# an additional util connection and other statistics data
+-- source include/no_view_protocol.inc
+
SET global query_cache_type=ON;
SET local query_cache_type=ON;
eval SET SESSION STORAGE_ENGINE = $engine_type;
diff --git a/mysql-test/include/unsafe_binlog.inc b/mysql-test/include/unsafe_binlog.inc
index 2fc2ad77bc9..4c74845e32f 100644
--- a/mysql-test/include/unsafe_binlog.inc
+++ b/mysql-test/include/unsafe_binlog.inc
@@ -21,7 +21,7 @@
# Test cases for bug#15650
# DELETE with LEFT JOIN crashes server with innodb_locks_unsafe_for_binlog
#
-
+--disable_service_connection
--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--enable_warnings
@@ -52,15 +52,19 @@ eval create table t1(a int not null, b int, primary key(a)) engine = $engine_typ
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
commit;
set autocommit = 0;
+--disable_view_protocol
select * from t1 lock in share mode;
+--enable_view_protocol
update t1 set b = 5 where b = 1;
connection b;
set autocommit = 0;
#
# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
#
+--disable_view_protocol
--error ER_LOCK_WAIT_TIMEOUT
select * from t1 where a = 2 and b = 2 for update;
+--enable_view_protocol
connection a;
commit;
connection b;
@@ -113,7 +117,9 @@ eval create table t2(d int not null, e int, primary key(d)) engine = $engine_typ
insert into t2 values (8,6),(12,1),(3,1);
commit;
set autocommit = 0;
+--disable_view_protocol
select * from t2 for update;
+--enable_view_protocol
connection b;
set autocommit = 0;
insert into t1 select * from t2;
@@ -171,7 +177,9 @@ eval create table t9(d int not null, e int, primary key(d)) engine = $engine_typ
insert into t9 values (8,6),(12,1),(3,1);
commit;
set autocommit = 0;
+--disable_view_protocol
select * from t2 for update;
+--enable_view_protocol
connection b;
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
@@ -263,3 +271,4 @@ disconnect h;
disconnect i;
disconnect j;
drop table t1, t2, t3, t5, t6, t8, t9;
+--enable_service_connection
diff --git a/mysql-test/include/update_use_source.inc b/mysql-test/include/update_use_source.inc
index 864b58e5d7f..3c487704233 100644
--- a/mysql-test/include/update_use_source.inc
+++ b/mysql-test/include/update_use_source.inc
@@ -4,6 +4,8 @@
--echo # Update a with value from subquery on the same table, no search clause. ALL access
--echo #
+#Enable view protocol after fix MDEV-29207
+--disable_view_protocol
start transaction;
--enable_info ONCE
update t1
@@ -145,3 +147,4 @@ update t1
order by c3 desc limit 2;
select concat(old_c1,'->',c1),c3, case when c1 != old_c1 then '*' else ' ' end "Changed" from t1 ;
rollback;
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string.inc b/mysql-test/include/weight_string.inc
index 1ae8801c560..78c013d7d02 100644
--- a/mysql-test/include/weight_string.inc
+++ b/mysql-test/include/weight_string.inc
@@ -33,7 +33,8 @@ DROP TABLE t1;
#
# End of MDEV-5180
#
-
+#enable after fix MDEV-29290
+--disable_view_protocol
select hex(weight_string('a'));
select hex(weight_string('A'));
select hex(weight_string('abc'));
@@ -64,3 +65,4 @@ select hex(weight_string('abc', 3, 4, 0xC0));
select hex(weight_string('abc', 4, 4, 0xC0));
select hex(weight_string('abc', 5, 4, 0xC0));
select hex(weight_string('abc',25, 4, 0xC0));
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_8140.inc b/mysql-test/include/weight_string_8140.inc
index f91d40a1381..5e1351e3680 100644
--- a/mysql-test/include/weight_string_8140.inc
+++ b/mysql-test/include/weight_string_8140.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select collation(cast(0x8140 as char));
select hex(weight_string(cast(0x6141 as char)));
select hex(weight_string(cast(0x8140 as char)));
@@ -33,4 +35,4 @@ select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0));
select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0));
select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0));
select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0));
-
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_8EA1.inc b/mysql-test/include/weight_string_8EA1.inc
index 0396fc9d808..95a502932fd 100644
--- a/mysql-test/include/weight_string_8EA1.inc
+++ b/mysql-test/include/weight_string_8EA1.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select collation(cast(0xA1A1 as char));
select hex(weight_string(cast(0x6141 as char)));
select hex(weight_string(cast(0x8EA1 as char)));
@@ -33,4 +35,4 @@ select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0));
select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0));
select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0));
select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0));
-
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_8FA2C3.inc b/mysql-test/include/weight_string_8FA2C3.inc
index 936b2e6c5e0..bce5c816406 100644
--- a/mysql-test/include/weight_string_8FA2C3.inc
+++ b/mysql-test/include/weight_string_8FA2C3.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select collation(cast(0x8FA2C3 as char));
select hex(weight_string(cast(0x6141 as char)));
select hex(weight_string(cast(0x8FA2C3 as char)));
@@ -33,4 +35,4 @@ select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0));
select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0));
select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0));
select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0));
-
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_A1A1.inc b/mysql-test/include/weight_string_A1A1.inc
index 34ace06d203..8a5111065ba 100644
--- a/mysql-test/include/weight_string_A1A1.inc
+++ b/mysql-test/include/weight_string_A1A1.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select collation(cast(0xA1A1 as char));
select hex(weight_string(cast(0x6141 as char)));
select hex(weight_string(cast(0xA1A1 as char)));
@@ -33,4 +35,4 @@ select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0));
select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0));
select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0));
select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0));
-
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_chde.inc b/mysql-test/include/weight_string_chde.inc
index 97c929605f9..54852a8c203 100644
--- a/mysql-test/include/weight_string_chde.inc
+++ b/mysql-test/include/weight_string_chde.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select @@collation_connection;
select collation(cast(_latin1 0xDF as char));
select hex(weight_string('s'));
@@ -57,3 +59,4 @@ select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0));
select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0));
select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0));
select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0));
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_euro.inc b/mysql-test/include/weight_string_euro.inc
index e888bdc3df0..835c515b6be 100644
--- a/mysql-test/include/weight_string_euro.inc
+++ b/mysql-test/include/weight_string_euro.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select @@collation_connection;
select hex(weight_string(cast(_latin1 0x80 as char)));
select hex(weight_string(cast(_latin1 0x808080 as char)));
@@ -28,3 +30,4 @@ select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0));
select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0));
select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0));
select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0));
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_l1.inc b/mysql-test/include/weight_string_l1.inc
index f5ad279e563..20b353c72bf 100644
--- a/mysql-test/include/weight_string_l1.inc
+++ b/mysql-test/include/weight_string_l1.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select @@collation_connection;
select hex(weight_string('a' LEVEL 1));
select hex(weight_string('A' LEVEL 1));
@@ -8,3 +10,4 @@ select hex(weight_string('abc' as char(5) LEVEL 1));
select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE));
select hex(weight_string('abc' as char(5) LEVEL 1 DESC));
select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE));
+--enable_view_protocol
diff --git a/mysql-test/include/weight_string_l2.inc b/mysql-test/include/weight_string_l2.inc
index 1802fcc9c79..28f90aa5789 100644
--- a/mysql-test/include/weight_string_l2.inc
+++ b/mysql-test/include/weight_string_l2.inc
@@ -1,3 +1,5 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
select @@collation_connection;
select hex(weight_string('a' LEVEL 2));
select hex(weight_string('A' LEVEL 2));
@@ -5,3 +7,4 @@ select hex(weight_string('abc' LEVEL 2));
select hex(weight_string('abc' as char(2) LEVEL 2));
select hex(weight_string('abc' as char(3) LEVEL 2));
select hex(weight_string('abc' as char(5) LEVEL 2));
+--disable_view_protocol