summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorLena Startseva <lena.startseva@mariadb.com>2022-09-27 13:17:59 +0700
committerLena Startseva <lena.startseva@mariadb.com>2022-09-27 13:17:59 +0700
commitf8f25b472e99569c88820787e293801208768b41 (patch)
tree5706936ec41f10a3ed3b4ed807b8e7b994ad4bdd /mysql-test/main
parent789f55c947a8aa224e5b0a71d5c0bea375320091 (diff)
parent2abf499c76a5b872e8dbf84aaa20e1990ed6407e (diff)
downloadmariadb-git-f8f25b472e99569c88820787e293801208768b41.tar.gz
Merge branch 'bb-10.5-all-builders' into bb-10.6-all-builders
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/alias.test3
-rw-r--r--mysql-test/main/alter_table.test4
-rw-r--r--mysql-test/main/ansi.test3
-rw-r--r--mysql-test/main/auto_increment_ranges_innodb.test4
-rw-r--r--mysql-test/main/backup_aria.test4
-rw-r--r--mysql-test/main/backup_interaction.test14
-rw-r--r--mysql-test/main/backup_lock.test2
-rw-r--r--mysql-test/main/backup_locks.test1
-rw-r--r--mysql-test/main/backup_priv.test3
-rw-r--r--mysql-test/main/bigint.test2
-rw-r--r--mysql-test/main/bool.test2
-rw-r--r--mysql-test/main/brackets.test3
-rw-r--r--mysql-test/main/cache_innodb.test3
-rw-r--r--mysql-test/main/case.test3
-rw-r--r--mysql-test/main/cast.test4
-rw-r--r--mysql-test/main/change_user.test2
-rw-r--r--mysql-test/main/client_xml.test1
-rw-r--r--mysql-test/main/comment_database.test2
-rw-r--r--mysql-test/main/commit.test1
-rw-r--r--mysql-test/main/concurrent_innodb_safelog.test5
-rw-r--r--mysql-test/main/concurrent_innodb_unsafelog.test4
-rw-r--r--mysql-test/main/create.test31
-rw-r--r--mysql-test/main/create_drop_event.test1
-rw-r--r--mysql-test/main/create_drop_role.test1
-rw-r--r--mysql-test/main/create_or_replace.test8
-rw-r--r--mysql-test/main/create_utf8.test4
-rw-r--r--mysql-test/main/cte_nonrecursive.test6
-rw-r--r--mysql-test/main/ctype_big5.test7
-rw-r--r--mysql-test/main/ctype_binary.test3
-rw-r--r--mysql-test/main/ctype_collate.test3
-rw-r--r--mysql-test/main/ctype_cp932.test3
-rw-r--r--mysql-test/main/ctype_eucjpms.test4
-rw-r--r--mysql-test/main/ctype_filename.test3
-rw-r--r--mysql-test/main/ctype_gb2312.test4
-rw-r--r--mysql-test/main/ctype_gbk.test4
-rw-r--r--mysql-test/main/ctype_latin1_de.test4
-rw-r--r--mysql-test/main/ctype_latin2.test4
-rw-r--r--mysql-test/main/ctype_latin2_ch.test9
-rw-r--r--mysql-test/main/ctype_ldml.test3
-rw-r--r--mysql-test/main/ctype_recoding.test12
-rw-r--r--mysql-test/main/ctype_sjis.test20
-rw-r--r--mysql-test/main/ctype_swe7.test7
-rw-r--r--mysql-test/main/ctype_tis620.test6
-rw-r--r--mysql-test/main/ctype_uca.test14
-rw-r--r--mysql-test/main/ctype_uca_innodb.test4
-rw-r--r--mysql-test/main/ctype_ujis.test18
-rw-r--r--mysql-test/main/ctype_upgrade.test12
-rw-r--r--mysql-test/main/ctype_utf16.test9
-rw-r--r--mysql-test/main/ctype_utf16_uca.test3
-rw-r--r--mysql-test/main/ctype_utf16le.test5
-rw-r--r--mysql-test/main/ctype_utf32.test18
-rw-r--r--mysql-test/main/ctype_utf32_uca.test2
-rw-r--r--mysql-test/main/ctype_utf8.test3
-rw-r--r--mysql-test/main/ctype_utf8mb4.test3
-rw-r--r--mysql-test/main/ctype_utf8mb4_innodb.test3
-rw-r--r--mysql-test/main/custom_aggregate_functions.test3
-rw-r--r--mysql-test/main/custom_aggregates_i_s.test3
-rw-r--r--mysql-test/main/date_formats.test3
-rw-r--r--mysql-test/main/ddl_i18n_koi8r.test2
-rw-r--r--mysql-test/main/ddl_i18n_utf8.test2
-rw-r--r--mysql-test/main/delayed.test8
-rw-r--r--mysql-test/main/derived_view.test2
-rw-r--r--mysql-test/main/drop.test4
-rw-r--r--mysql-test/main/dyncol.test2
-rw-r--r--mysql-test/main/events_2.test3
-rw-r--r--mysql-test/main/events_bugs.test4
-rw-r--r--mysql-test/main/events_grant.test3
-rw-r--r--mysql-test/main/events_logs_tests.test1
-rw-r--r--mysql-test/main/events_trans.test1
-rw-r--r--mysql-test/main/fast_prefix_index_fetch_innodb.test2
-rw-r--r--mysql-test/main/fix_priv_tables.test1
-rw-r--r--mysql-test/main/flush-innodb.test4
-rw-r--r--mysql-test/main/flush.test10
-rw-r--r--mysql-test/main/flush_logs_not_windows.test4
-rw-r--r--mysql-test/main/flush_table.test4
-rw-r--r--mysql-test/main/fulltext.test9
-rw-r--r--mysql-test/main/fulltext2.test3
-rw-r--r--mysql-test/main/fulltext_left_join.test3
-rw-r--r--mysql-test/main/func_compress.test7
-rw-r--r--mysql-test/main/func_concat.test6
-rw-r--r--mysql-test/main/func_debug.test31
-rw-r--r--mysql-test/main/func_default.test5
-rw-r--r--mysql-test/main/func_digest.test6
-rw-r--r--mysql-test/main/func_encrypt_ucs2.test3
-rw-r--r--mysql-test/main/func_extract.test10
-rw-r--r--mysql-test/main/func_gconcat.test8
-rw-r--r--mysql-test/main/func_group.test10
-rw-r--r--mysql-test/main/func_group_innodb.test3
-rw-r--r--mysql-test/main/func_hybrid_type.test43
-rw-r--r--mysql-test/main/func_if.test4
-rw-r--r--mysql-test/main/func_in.test16
-rw-r--r--mysql-test/main/func_json.test19
-rw-r--r--mysql-test/main/func_like.test4
-rw-r--r--mysql-test/main/func_math.test21
-rw-r--r--mysql-test/main/func_misc.test20
-rw-r--r--mysql-test/main/func_regexp_pcre.test24
-rw-r--r--mysql-test/main/func_rollback.test1
-rw-r--r--mysql-test/main/func_sapdb.test12
-rw-r--r--mysql-test/main/func_set.test6
-rw-r--r--mysql-test/main/func_str.test119
-rw-r--r--mysql-test/main/func_system.test3
-rw-r--r--mysql-test/main/func_test.test8
-rw-r--r--mysql-test/main/func_time.test68
-rw-r--r--mysql-test/main/func_time_hires.test6
-rw-r--r--mysql-test/main/func_time_round.test6
-rw-r--r--mysql-test/main/get_diagnostics.test3
-rw-r--r--mysql-test/main/gis-debug.test2
-rw-r--r--mysql-test/main/gis-json.test13
-rw-r--r--mysql-test/main/gis-precise.test29
-rw-r--r--mysql-test/main/gis.test47
-rw-r--r--mysql-test/main/grant4.test4
-rw-r--r--mysql-test/main/grant_4332.test4
-rw-r--r--mysql-test/main/grant_kill.test3
-rw-r--r--mysql-test/main/group_by.test37
-rw-r--r--mysql-test/main/handler_read_last.test4
-rw-r--r--mysql-test/main/having.test11
-rw-r--r--mysql-test/main/having_cond_pushdown.test3
-rw-r--r--mysql-test/main/implicit_commit.test4
-rw-r--r--mysql-test/main/information_schema_all_engines.test4
-rw-r--r--mysql-test/main/information_schema_db.test4
-rw-r--r--mysql-test/main/information_schema_part.test2
-rw-r--r--mysql-test/main/init_file_set_password-7656.test2
-rw-r--r--mysql-test/main/innodb_ext_key.test4
-rw-r--r--mysql-test/main/invisible_binlog.test2
-rw-r--r--mysql-test/main/join_cache.test29
-rw-r--r--mysql-test/main/join_nested.test5
-rw-r--r--mysql-test/main/join_outer.test7
-rw-r--r--mysql-test/main/key.test4
-rw-r--r--mysql-test/main/kill-2.test3
-rw-r--r--mysql-test/main/kill.test4
-rw-r--r--mysql-test/main/loaddata.test27
-rw-r--r--mysql-test/main/lock_view.test4
-rw-r--r--mysql-test/main/lowercase_table.test3
-rw-r--r--mysql-test/main/lowercase_table_qcache.test2
-rw-r--r--mysql-test/main/mdev375.test2
-rw-r--r--mysql-test/main/mdl.test3
-rw-r--r--mysql-test/main/merge_mmap.test2
-rw-r--r--mysql-test/main/metadata.test2
-rw-r--r--mysql-test/main/multi_statement.test3
-rw-r--r--mysql-test/main/multi_update.test3
-rw-r--r--mysql-test/main/myisam-optimize.test2
-rw-r--r--mysql-test/main/myisam.test3
-rw-r--r--mysql-test/main/myisam_optimize.test2
-rw-r--r--mysql-test/main/mysql_upgrade.test4
-rw-r--r--mysql-test/main/mysqlcheck.test3
-rw-r--r--mysql-test/main/no-threads.test4
-rw-r--r--mysql-test/main/null.test17
-rw-r--r--mysql-test/main/null_key.test3
-rw-r--r--mysql-test/main/olap.test15
-rw-r--r--mysql-test/main/opt_trace.test43
-rw-r--r--mysql-test/main/opt_trace_index_merge.test3
-rw-r--r--mysql-test/main/opt_trace_security.test2
-rw-r--r--mysql-test/main/opt_trace_ucs2.test3
-rw-r--r--mysql-test/main/order_by.test5
-rw-r--r--mysql-test/main/outfile_loaddata.test4
-rw-r--r--mysql-test/main/parser.test36
-rw-r--r--mysql-test/main/partition_explicit_prune.test13
-rw-r--r--mysql-test/main/partition_innodb.test14
-rw-r--r--mysql-test/main/partition_innodb_plugin.test3
-rw-r--r--mysql-test/main/partition_innodb_semi_consistent.test2
-rw-r--r--mysql-test/main/partition_symlink.test5
-rw-r--r--mysql-test/main/percona_nonflushing_analyze_debug.test1
-rw-r--r--mysql-test/main/plugin.test2
-rw-r--r--mysql-test/main/plugin_auth_qa.test2
-rw-r--r--mysql-test/main/plugin_auth_qa_1.test2
-rw-r--r--mysql-test/main/plugin_auth_qa_2.test2
-rw-r--r--mysql-test/main/plugin_auth_qa_3.test2
-rw-r--r--mysql-test/main/pool_of_threads.test4
-rw-r--r--mysql-test/main/precedence.test6
-rw-r--r--mysql-test/main/processlist.test2
-rw-r--r--mysql-test/main/profiling.test1
-rw-r--r--mysql-test/main/ps_1general.test5
-rw-r--r--mysql-test/main/ps_ddl.test3
-rw-r--r--mysql-test/main/query_cache.test1
-rw-r--r--mysql-test/main/query_cache_debug.test3
-rw-r--r--mysql-test/main/query_cache_innodb.test3
-rw-r--r--mysql-test/main/query_cache_merge.test4
-rw-r--r--mysql-test/main/query_cache_with_views.test1
-rw-r--r--mysql-test/main/range.test9
-rw-r--r--mysql-test/main/range_vs_index_merge.test3
-rw-r--r--mysql-test/main/read_only_innodb.test1
-rw-r--r--mysql-test/main/reopen_temp_table.test4
-rw-r--r--mysql-test/main/repair.test4
-rw-r--r--mysql-test/main/reset_connection.test5
-rw-r--r--mysql-test/main/row.test7
-rw-r--r--mysql-test/main/second_frac-9175.test5
-rw-r--r--mysql-test/main/select.test33
-rw-r--r--mysql-test/main/select_found.test5
-rw-r--r--mysql-test/main/selectivity.test4
-rw-r--r--mysql-test/main/set_operation_oracle.test7
-rw-r--r--mysql-test/main/set_password.test2
-rw-r--r--mysql-test/main/set_statement.test2
-rw-r--r--mysql-test/main/show_explain.test4
-rw-r--r--mysql-test/main/show_profile.test4
-rw-r--r--mysql-test/main/shutdown.test3
-rw-r--r--mysql-test/main/shutdown_not_windows.test2
-rw-r--r--mysql-test/main/simultaneous_assignment.test7
-rw-r--r--mysql-test/main/single_delete_update.test4
-rw-r--r--mysql-test/main/sp-anchor-type.test4
-rw-r--r--mysql-test/main/sp-error.test2
-rw-r--r--mysql-test/main/sp-lock.test3
-rw-r--r--mysql-test/main/sp-prelocking.test4
-rw-r--r--mysql-test/main/sp-security-anchor-type.test7
-rw-r--r--mysql-test/main/sp.test12
-rw-r--r--mysql-test/main/sql_mode.test6
-rw-r--r--mysql-test/main/stat_tables.test4
-rw-r--r--mysql-test/main/statistics.test4
-rw-r--r--mysql-test/main/subselect.test88
-rw-r--r--mysql-test/main/subselect2.test4
-rw-r--r--mysql-test/main/subselect3.inc3
-rw-r--r--mysql-test/main/subselect4.test3
-rw-r--r--mysql-test/main/subselect_cache.test4
-rw-r--r--mysql-test/main/subselect_exists2in.test13
-rw-r--r--mysql-test/main/subselect_extra.test4
-rw-r--r--mysql-test/main/subselect_extra_no_semijoin.test4
-rw-r--r--mysql-test/main/subselect_innodb.test18
-rw-r--r--mysql-test/main/subselect_mat.test4
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.test3
-rw-r--r--mysql-test/main/subselect_sj_mat.test8
-rw-r--r--mysql-test/main/symlink.test5
-rw-r--r--mysql-test/main/table_elim.test5
-rw-r--r--mysql-test/main/table_value_constr.test23
-rw-r--r--mysql-test/main/temp_table.test3
-rw-r--r--mysql-test/main/temp_table_frm.test4
-rw-r--r--mysql-test/main/thread_pool_info.test2
-rw-r--r--mysql-test/main/timezone2.test17
-rw-r--r--mysql-test/main/tmp_table_count-7586.test4
-rw-r--r--mysql-test/main/trigger.test2
-rw-r--r--mysql-test/main/truncate.test5
-rw-r--r--mysql-test/main/truncate_notembedded.test2
-rw-r--r--mysql-test/main/type_binary.test2
-rw-r--r--mysql-test/main/type_bit.test8
-rw-r--r--mysql-test/main/type_bit_innodb.test2
-rw-r--r--mysql-test/main/type_date.test8
-rw-r--r--mysql-test/main/type_datetime.test23
-rw-r--r--mysql-test/main/type_enum.test4
-rw-r--r--mysql-test/main/type_float.test6
-rw-r--r--mysql-test/main/type_hex_hybrid.test2
-rw-r--r--mysql-test/main/type_interval.test6
-rw-r--r--mysql-test/main/type_json.test7
-rw-r--r--mysql-test/main/type_newdecimal.test28
-rw-r--r--mysql-test/main/type_num.test2
-rw-r--r--mysql-test/main/type_time.test6
-rw-r--r--mysql-test/main/type_time_round.test3
-rw-r--r--mysql-test/main/type_timestamp.test3
-rw-r--r--mysql-test/main/type_year.test5
-rw-r--r--mysql-test/main/udf.test7
-rw-r--r--mysql-test/main/udf_debug_sync.test2
-rw-r--r--mysql-test/main/union.test20
-rw-r--r--mysql-test/main/update.test3
-rw-r--r--mysql-test/main/update_innodb.test3
-rw-r--r--mysql-test/main/upgrade.test3
-rw-r--r--mysql-test/main/upgrade_mdev_24363.test3
-rw-r--r--mysql-test/main/user_var.test3
-rw-r--r--mysql-test/main/userstat-badlogin-4824.test4
-rw-r--r--mysql-test/main/varbinary.test6
-rw-r--r--mysql-test/main/win.test3
-rw-r--r--mysql-test/main/win_avg.test5
-rw-r--r--mysql-test/main/win_big-mdev-10092.test5
-rw-r--r--mysql-test/main/win_big-mdev-11697.test3
-rw-r--r--mysql-test/main/win_big.test19
-rw-r--r--mysql-test/main/win_first_last_value.test3
-rw-r--r--mysql-test/main/win_nth_value.test6
-rw-r--r--mysql-test/main/win_ntile.test3
-rw-r--r--mysql-test/main/win_orderby.test3
-rw-r--r--mysql-test/main/win_percentile.test5
-rw-r--r--mysql-test/main/win_std.test4
-rw-r--r--mysql-test/main/win_sum.test3
-rw-r--r--mysql-test/main/xa_prepared_binlog_off.test1
-rw-r--r--mysql-test/main/xml.test71
270 files changed, 1916 insertions, 152 deletions
diff --git a/mysql-test/main/alias.test b/mysql-test/main/alias.test
index a0c9377d6dd..bc429656b7e 100644
--- a/mysql-test/main/alias.test
+++ b/mysql-test/main/alias.test
@@ -1,3 +1,6 @@
+#remove this include after fix MDEV-27871
+--source include/no_view_protocol.inc
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index b339da5edb2..02a9455aaf0 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -779,6 +779,8 @@ drop table t1;
# Unix/Windows and transactional/non-transactional tables).
# See also innodb_mysql.test
#
+
+--disable_service_connection
--disable_warnings
drop table if exists t1, t2, t3;
--enable_warnings
@@ -821,7 +823,7 @@ unlock tables;
insert into t1 values ();
select * from t1;
drop tables t1, t3;
-
+--enable_service_connection
#
# Bug#18775 - Temporary table from alter table visible to other threads
diff --git a/mysql-test/main/ansi.test b/mysql-test/main/ansi.test
index 0620465728b..19dc4ff0769 100644
--- a/mysql-test/main/ansi.test
+++ b/mysql-test/main/ansi.test
@@ -5,7 +5,7 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-
+--disable_service_connection
set sql_mode="MySQL40";
select @@sql_mode;
set @@sql_mode="ANSI";
@@ -72,3 +72,4 @@ SELECT -1||0^1 AS a FROM DUAL;
EXPLAIN EXTENDED SELECT -1^1||1 AS a FROM DUAL;
EXPLAIN EXTENDED SELECT -1||0^1 AS a FROM DUAL;
+--enable_service_connection
diff --git a/mysql-test/main/auto_increment_ranges_innodb.test b/mysql-test/main/auto_increment_ranges_innodb.test
index 92d377eb147..aaa64e2d6f9 100644
--- a/mysql-test/main/auto_increment_ranges_innodb.test
+++ b/mysql-test/main/auto_increment_ranges_innodb.test
@@ -23,7 +23,7 @@ drop table t1;
--echo # MDEV-21842: auto_increment does not increment with compound primary
--echo # key on partitioned table
--echo #
-
+--disable_service_connection
create or replace table `t` (
`id` bigint(20) unsigned not null auto_increment,
`a` int(10) not null ,
@@ -76,4 +76,4 @@ disconnect con2;
--connection default
select * from t;
drop table t;
-
+--enable_service_connection
diff --git a/mysql-test/main/backup_aria.test b/mysql-test/main/backup_aria.test
index 7b741b829a1..7e8451ab795 100644
--- a/mysql-test/main/backup_aria.test
+++ b/mysql-test/main/backup_aria.test
@@ -8,6 +8,7 @@
# As non transactional engine we use Aria with TRANSACTIONAL = 0
--source include/have_aria.inc
+--disable_service_connection
# Following connections are used in a few of the following tests
connect (con1,localhost,root,,);
@@ -61,6 +62,7 @@ INSERT INTO t_permanent_aria SET col1 = 1;
CREATE TABLE throw_away (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
--error ER_BACKUP_LOCK_IS_ACTIVE
RENAME TABLE t_permanent_aria To throw_away;
+--disable_view_protocol
--echo # - DDL creating a temporary table is allowed.
CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
--echo # - DML modifying that temporary table is allowed.
@@ -107,6 +109,7 @@ ALTER TABLE t_temporary_aria ADD KEY idx(col2);
BACKUP STAGE END;
DROP TABLE t_permanent_aria;
+--enable_view_protocol
--echo #-----------------------------------------------------------------------
--echo # Show that non transactional tables locks with BACKUP STAGE FLUSH
@@ -155,3 +158,4 @@ drop table t1;
--echo #
disconnect con1;
+--enable_service_connection
diff --git a/mysql-test/main/backup_interaction.test b/mysql-test/main/backup_interaction.test
index a398a4a2d2d..c755bdf8f95 100644
--- a/mysql-test/main/backup_interaction.test
+++ b/mysql-test/main/backup_interaction.test
@@ -50,6 +50,7 @@ unlock tables;
--echo #
--echo # Check lock tables under BACKUP STAGE
--echo #
+--disable_service_connection
backup stage start;
unlock tables;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
@@ -61,7 +62,7 @@ lock table t1 read;
unlock tables;
backup stage end;
drop table t1;
-
+--enable_service_connection
--echo #
--echo # Check setting readonly under BACKUP STAGE
@@ -118,6 +119,7 @@ drop table t1;
--echo #
--echo # BACKUP STAGE performs implicit commits
--echo #
+--disable_view_protocol
create table t1(a int) engine=InnoDB;
begin;
insert into t1 values(1);
@@ -128,12 +130,13 @@ backup stage block_commit;
commit;
backup stage end;
drop table t1;
+--enable_view_protocol
--echo # Ensure that BACKUP STAGE ... does AUTOCOMMIT like most DDL.
--echo # Sideeffect:
--echo # Show the impact of not yet committed INSERT before sequence start
--echo # and ROLLBACK sliding through the sequence.
-
+--disable_service_connection
CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
SET AUTOCOMMIT = 0;
INSERT INTO t1 SET col1 = 1;
@@ -217,7 +220,7 @@ drop table t1;
--echo # CHECK: RO transaction under BACKUP STAGE is a potential deadlock
--echo # OTOH we most probably allow them under FTWRL as well
--echo #
-
+--disable_view_protocol
CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
insert into t1 values (1);
backup stage start;
@@ -228,6 +231,7 @@ select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage end;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
drop table t1;
+--enable_view_protocol
--echo #
--echo # Check that handler are closed by backup stage block_ddl
@@ -347,6 +351,7 @@ SET SESSION sql_log_bin = 1;
SET SESSION sql_log_bin = 0;
BACKUP STAGE END;
SET SESSION sql_log_bin = 1;
+--enable_service_connection
--echo #-----------------------------------------------------------------------
--echo # BACKUP STAGE statements are not allowed in stored routines
@@ -446,7 +451,7 @@ DROP TABLE t1_myisam;
--echo #
--echo # Creating and modifying TEMPORARY TABLES are allowed
--echo #
-
+--disable_view_protocol
BACKUP STAGE START;
BACKUP STAGE BLOCK_DDL;
CREATE TEMPORARY TABLE tmp (col1 INT);
@@ -501,6 +506,7 @@ TRUNCATE t_temporary_innodb;
ALTER TABLE t_temporary_innodb ADD COLUMN col2 INT;
ALTER TABLE t_temporary_innodb ADD KEY idx(col2);
BACKUP STAGE END;
+--enable_view_protocol
#
# MDEV-18067, MDEV-18068 and MDEV-18069
diff --git a/mysql-test/main/backup_lock.test b/mysql-test/main/backup_lock.test
index 9fdc42b54ea..5453e5b0e7d 100644
--- a/mysql-test/main/backup_lock.test
+++ b/mysql-test/main/backup_lock.test
@@ -5,6 +5,8 @@
--source include/have_innodb.inc
--source include/have_metadata_lock_info.inc
--source include/not_embedded.inc
+--source include/no_view_protocol.inc
+
--echo #
--echo # Testing which locks we get from all stages
diff --git a/mysql-test/main/backup_locks.test b/mysql-test/main/backup_locks.test
index 7dc97d7932d..2c2c226f847 100644
--- a/mysql-test/main/backup_locks.test
+++ b/mysql-test/main/backup_locks.test
@@ -5,6 +5,7 @@
--source include/have_innodb.inc
--source include/have_metadata_lock_info.inc
--source include/not_embedded.inc
+--source include/no_view_protocol.inc
--echo #
--echo # Test lock taken
diff --git a/mysql-test/main/backup_priv.test b/mysql-test/main/backup_priv.test
index 93b69af0b67..c77075c2393 100644
--- a/mysql-test/main/backup_priv.test
+++ b/mysql-test/main/backup_priv.test
@@ -5,6 +5,7 @@
--echo #
--echo # Test privileges for BACKUP STAGES
--echo #
+--disable_service_connection
set sql_mode="";
@@ -50,3 +51,5 @@ DROP USER user1@localhost, user2@localhost;
--error ER_SP_BADSTATEMENT
create procedure foo42()
BACKUP STAGE START;
+
+--enable_service_connection
diff --git a/mysql-test/main/bigint.test b/mysql-test/main/bigint.test
index 68ffcd9230e..fc7d6a39060 100644
--- a/mysql-test/main/bigint.test
+++ b/mysql-test/main/bigint.test
@@ -311,6 +311,7 @@ select cast(-19999999999999999999 as signed);
#
# PS protocol gives different metadata for `Max length' column
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
select -9223372036854775808;
@@ -319,6 +320,7 @@ select -((9223372036854775808));
select -(-(9223372036854775808));
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
select --9223372036854775808, ---9223372036854775808, ----9223372036854775808;
select -(-9223372036854775808), -(-(-9223372036854775808));
diff --git a/mysql-test/main/bool.test b/mysql-test/main/bool.test
index 34c51c648d3..d79e3e36762 100644
--- a/mysql-test/main/bool.test
+++ b/mysql-test/main/bool.test
@@ -21,10 +21,12 @@ SELECT * FROM t1 where (1 AND a)=1;
SELECT * FROM t1 where (1 AND a) IS NULL;
# WL#638 - Behaviour of NOT does not follow SQL specification
+--disable_service_connection
set sql_mode='high_not_precedence';
select * from t1 where not a between 2 and 3;
set sql_mode=default;
select * from t1 where not a between 2 and 3;
+--enable_service_connection
# SQL boolean tests
select a, a is false, a is true, a is unknown from t1;
diff --git a/mysql-test/main/brackets.test b/mysql-test/main/brackets.test
index b7bb616bd05..9a0c204e271 100644
--- a/mysql-test/main/brackets.test
+++ b/mysql-test/main/brackets.test
@@ -2246,6 +2246,8 @@ drop view v1;
--echo 10.2. view as tailed simple select
+#enable after fix MDEV-29554
+--disable_view_protocol
create view v1 as
select * from t1 order by a;
show create view v1;
@@ -2257,6 +2259,7 @@ create view v1 as
show create view v1;
select * from v1;
drop view v1;
+--enable_view_protocol
--echo 10.3. view as union
diff --git a/mysql-test/main/cache_innodb.test b/mysql-test/main/cache_innodb.test
index f7102627506..efd877dda24 100644
--- a/mysql-test/main/cache_innodb.test
+++ b/mysql-test/main/cache_innodb.test
@@ -19,6 +19,7 @@ let $test_foreign_keys= 1;
# Bug#56452 Assertion failed: thd->transaction.stmt.is_empty() ||
# thd->in_sub_stmt
#
+--disable_view_protocol
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES(1);
@@ -28,4 +29,4 @@ ROLLBACK WORK AND CHAIN NO RELEASE;
SELECT a FROM t1;
ROLLBACK;
DROP TABLE t1;
-
+--enable_view_protocol
diff --git a/mysql-test/main/case.test b/mysql-test/main/case.test
index 78d5b3a5951..b80408f44d6 100644
--- a/mysql-test/main/case.test
+++ b/mysql-test/main/case.test
@@ -2,6 +2,9 @@
# Testing of CASE
#
+#remove this include after fix MDEV-27871
+--source include/no_view_protocol.inc
+
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
diff --git a/mysql-test/main/cast.test b/mysql-test/main/cast.test
index a4b87127187..025b5fa717d 100644
--- a/mysql-test/main/cast.test
+++ b/mysql-test/main/cast.test
@@ -2,6 +2,10 @@
# Test of cast function
#
+#remove this include after fix MDEV-27871
+# discuss what to do with "set names binary"
+--source include/no_view_protocol.inc
+
# For TIME->DATETIME conversion
SET timestamp=unix_timestamp('2001-02-03 10:20:30');
diff --git a/mysql-test/main/change_user.test b/mysql-test/main/change_user.test
index d191b1c3ca0..4073b79a9c6 100644
--- a/mysql-test/main/change_user.test
+++ b/mysql-test/main/change_user.test
@@ -1,4 +1,5 @@
# This test is checking that old password authentication works
+--disable_service_connection
set global secure_auth=0;
#
# functional change user tests
@@ -149,3 +150,4 @@ select year(now()) > 2011;
--echo change_user
--change_user
select year(now()) > 2011;
+--enable_service_connection
diff --git a/mysql-test/main/client_xml.test b/mysql-test/main/client_xml.test
index 5230922e4b8..d39659a3335 100644
--- a/mysql-test/main/client_xml.test
+++ b/mysql-test/main/client_xml.test
@@ -1,5 +1,6 @@
# Can't run with embedded server
-- source include/not_embedded.inc
+-- source include/no_view_protocol.inc
# Disable concurrent inserts to avoid test failures when reading
# data from concurrent connections (insert might return before
diff --git a/mysql-test/main/comment_database.test b/mysql-test/main/comment_database.test
index 3fe1c7b205c..bf89a57c7b2 100644
--- a/mysql-test/main/comment_database.test
+++ b/mysql-test/main/comment_database.test
@@ -52,6 +52,7 @@ SHOW CREATE DATABASE db1;
DROP DATABASE db1;
# Test the case when the database is named 'comment'
+--disable_service_connection
CREATE DATABASE comment COMMENT 'comment' CHARACTER SET 'latin2';
SHOW CREATE DATABASE comment;
ALTER DATABASE comment COMMENT 'comment comment';
@@ -61,3 +62,4 @@ ALTER DATABASE COMMENT 'comment';
SELECT * FROM information_schema.schemata
WHERE schema_name='comment';
DROP DATABASE comment;
+--enable_service_connection
diff --git a/mysql-test/main/commit.test b/mysql-test/main/commit.test
index 9f5e077fd2d..a0d4ddee152 100644
--- a/mysql-test/main/commit.test
+++ b/mysql-test/main/commit.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/no_view_protocol.inc
connect (con1,localhost,root,,);
diff --git a/mysql-test/main/concurrent_innodb_safelog.test b/mysql-test/main/concurrent_innodb_safelog.test
index 7f6b3c328f2..d590dfa6cfe 100644
--- a/mysql-test/main/concurrent_innodb_safelog.test
+++ b/mysql-test/main/concurrent_innodb_safelog.test
@@ -11,7 +11,6 @@
# t/concurrent_innodb_unsafelog.test
# new wrapper t/concurrent_innodb_safelog.test
#
-
--source include/have_innodb.inc
let $engine_type= InnoDB;
@@ -19,7 +18,7 @@ let $engine_type= InnoDB;
SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
SET GLOBAL innodb_lock_wait_timeout = 1;
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-
+--disable_service_connection
--source include/concurrent.inc
-
+--enable_service_connection
SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
diff --git a/mysql-test/main/concurrent_innodb_unsafelog.test b/mysql-test/main/concurrent_innodb_unsafelog.test
index eee2295211e..d9e5effaaf6 100644
--- a/mysql-test/main/concurrent_innodb_unsafelog.test
+++ b/mysql-test/main/concurrent_innodb_unsafelog.test
@@ -20,8 +20,8 @@ SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
SET GLOBAL innodb_lock_wait_timeout = 1;
SET @save_isolation = @@GLOBAL.tx_isolation;
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
-
+--disable_service_connection
--source include/concurrent.inc
-
+--enable_service_connection
SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
SET GLOBAL tx_isolation = @save_isolation;
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index 5f84e282570..074195a331d 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -106,6 +106,7 @@ create table t1 (i int, index `` (i));
# We don't allow creation of non-temporary tables under LOCK TABLES
# as following meta-data locking protocol in this case can lead to
# deadlock.
+--disable_service_connection
create table t1 (i int);
lock tables t1 read;
--error ER_TABLE_NOT_LOCKED
@@ -115,6 +116,7 @@ create temporary table t2 (j int);
drop temporary table t2;
unlock tables;
drop table t1;
+--enable_service_connection
#
# Test of CREATE ... SELECT with indexes
@@ -286,7 +288,7 @@ drop table if exists t2,t1;
#
# Test for CREATE TABLE .. LIKE ..
#
-
+--disable_view_protocol
create table t1(id int not null, name char(20));
insert into t1 values(10,'mysql'),(20,'monty- the creator');
create table t2(id int not null);
@@ -325,13 +327,14 @@ create temporary table t3 like t1;
drop table t1, t2, t3;
drop table t3;
drop database mysqltest;
-
+--enable_view_protocol
#
# CREATE TABLE LIKE under LOCK TABLES
#
# Similarly to ordinary CREATE TABLE we don't allow creation of
# non-temporary tables under LOCK TABLES. Also we require source
# table to be locked.
+--disable_service_connection
create table t1 (i int);
create table t2 (j int);
lock tables t1 read;
@@ -345,6 +348,7 @@ drop temporary table t3;
create temporary table t3 like t2;
unlock tables;
drop tables t1, t2;
+--enable_service_connection
#
# Test default table type
@@ -453,7 +457,7 @@ drop table t1, t2, t3;
#
# Bug #1209
#
-
+--disable_service_connection
create database mysqltest;
use mysqltest;
select database();
@@ -469,6 +473,7 @@ connection default;
disconnect user1;
drop user mysqltest_1;
use test;
+--enable_service_connection
#
# Test for Bug 856 'Naming a key "Primary" causes trouble'
@@ -530,6 +535,7 @@ drop table t1,t2;
# This tests two additional possible errors and a hang if
# an improper fix is present.
#
+--disable_service_connection
create table t1 (a int);
--error ER_TABLE_EXISTS_ERROR
create table t1 select * from t1;
@@ -538,6 +544,7 @@ create table t2 union = (t1) select * from t1;
flush tables with read lock;
unlock tables;
drop table t1;
+--enable_service_connection
#
# Bug#10413: Invalid column name is not rejected
@@ -771,14 +778,14 @@ create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1
# permanent table. After patch for Bug#47418, we create the base table and
# instert data into it, even though a temporary table exists with the same
# name.
-
+--disable_view_protocol
create temporary table t1 (j int);
create table if not exists t1 select 1;
select * from t1;
drop temporary table t1;
select * from t1;
drop table t1;
-
+--enable_view_protocol
#
# CREATE TABLE ... SELECT and LOCK TABLES
#
@@ -787,7 +794,7 @@ drop table t1;
# the server doesn't crash, hang and produces sensible errors.
# Includes test for bug #20662 "Infinite loop in CREATE TABLE
# IF NOT EXISTS ... SELECT with locked tables".
-
+--disable_service_connection
create table t1 (i int);
insert into t1 values (1), (2);
lock tables t1 read;
@@ -832,7 +839,7 @@ create temporary table if not exists t2 select * from t1;
select * from t2;
unlock tables;
drop table t1, t2;
-
+--enable_service_connection
#
# Bug#21772: can not name a column 'upgrade' when create a table
@@ -1301,7 +1308,7 @@ DROP VIEW t2;
--echo # Bug #49193 CREATE TABLE reacts differently depending
--echo # on whether data is selected or not
--echo #
-
+--disable_view_protocol
CREATE TEMPORARY TABLE t2 (ID INT);
INSERT INTO t2 VALUES (1),(2),(3);
@@ -1337,7 +1344,7 @@ SELECT * FROM t1;
DROP TABLE t1;
DROP TEMPORARY TABLE t2;
-
+--enable_view_protocol
--echo #
--echo # Bug #22909 "Using CREATE ... LIKE is possible to create field
@@ -1418,7 +1425,7 @@ drop table t1;
--echo #
--echo # 2. A temporary table.
--echo #
-
+--disable_view_protocol
create temporary table if not exists t1 (a int) select 1 as a;
select * from t1;
--error ER_TABLE_EXISTS_ERROR
@@ -1571,6 +1578,7 @@ select * from t1;
drop table t1;
--error ER_NO_SUCH_TABLE
create table if not exists t1 (a int) select * from t1;
+--enable_view_protocol
--echo #
--echo # 7. Test of non-matching columns, REPLACE and IGNORE.
@@ -1611,7 +1619,7 @@ drop table t1;
--echo #
--echo # Checking that CREATE IF NOT EXISTS is not blocked by running SELECT
--echo #
-
+--disable_service_connection
create table t1 (a int, b int) engine=myisam;
create table t2 (a int, b int) engine=myisam;
insert into t1 values (1,1);
@@ -1634,6 +1642,7 @@ connection default;
select * from t1;
unlock tables;
drop table t1,t2;
+--enable_service_connection
--echo #
--echo # MDEV-6179: dynamic columns functions/cast()/convert() doesn't
diff --git a/mysql-test/main/create_drop_event.test b/mysql-test/main/create_drop_event.test
index d885a39e453..a906ec33072 100644
--- a/mysql-test/main/create_drop_event.test
+++ b/mysql-test/main/create_drop_event.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
+--source include/no_view_protocol.inc
SET timestamp=UNIX_TIMESTAMP('2014-11-01 10:20:30');
SET GLOBAL event_scheduler=off;
diff --git a/mysql-test/main/create_drop_role.test b/mysql-test/main/create_drop_role.test
index 11bc832c6e9..808461ed344 100644
--- a/mysql-test/main/create_drop_role.test
+++ b/mysql-test/main/create_drop_role.test
@@ -1,3 +1,4 @@
+--source include/no_view_protocol.inc
--source include/not_embedded.inc
CREATE ROLE IF NOT EXISTS role1 WITH ADMIN user1;
diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test
index 573e0e177c2..3a860f5af29 100644
--- a/mysql-test/main/create_or_replace.test
+++ b/mysql-test/main/create_or_replace.test
@@ -44,7 +44,7 @@ DROP TEMPORARY TABLE t1;
--echo #
--echo # Testing with temporary tables
--echo #
-
+--disable_view_protocol
CREATE OR REPLACE TABLE t1 (a int);
CREATE OR REPLACE TEMPORARY TABLE t1 (a int);
CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int);
@@ -104,6 +104,7 @@ create or replace table t1 as select a from (select a from t1) as t3;
--error ER_UPDATE_TABLE_USED
create or replace table t1 as select a from t2 where t2.a in (select a from t1);
drop table t1;
+--enable_view_protocol
--echo #
--echo # Testing with normal tables
@@ -126,6 +127,7 @@ CREATE OR REPLACE TABLE t1 AS SELECT 1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--disable_service_connection
# Using lock tables with CREATE OR REPLACE
CREATE OR REPLACE TABLE t1 (a int);
LOCK TABLES t1 write,t2 write;
@@ -207,6 +209,7 @@ drop table t1,t3,t4;
--echo # Test the meta data locks are freed properly
--echo #
+--disable_view_protocol
create database mysqltest2;
drop table if exists test.t1,mysqltest2.t2;
@@ -289,7 +292,7 @@ show tables;
select * from information_schema.metadata_lock_info;
create table t1 (i int);
drop table t1;
-
+--enable_view_protocol
--echo #
--echo # Testing CREATE .. LIKE
@@ -507,6 +510,7 @@ CREATE OR REPLACE TEMPORARY TABLE t2(c INT DEFAULT '');
SELECT * FROM t3;
UNLOCK TABLES;
DROP TABLE t3;
+--enable_service_connection
--echo # End of 10.4 tests
diff --git a/mysql-test/main/create_utf8.test b/mysql-test/main/create_utf8.test
index 40e814834bc..a868b847679 100644
--- a/mysql-test/main/create_utf8.test
+++ b/mysql-test/main/create_utf8.test
@@ -1,6 +1,7 @@
#
# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
#
+--disable_service_connection
set names utf8;
create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
@@ -25,6 +26,7 @@ from имÑ_таблицы_в_кодировке_утф8_длиной_больш
# database, table, field, key, view
select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+--disable_view_protocol
--sorted_result
select TABLE_NAME from information_schema.tables where
table_schema='test';
@@ -37,6 +39,7 @@ table_schema='test';
select TABLE_NAME from information_schema.views where
table_schema='test';
+--enable_view_protocol
show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
@@ -78,3 +81,4 @@ return 0;
drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
set names default;
+--enable_service_connection
diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test
index edb7771c4a3..c420a5e0483 100644
--- a/mysql-test/main/cte_nonrecursive.test
+++ b/mysql-test/main/cte_nonrecursive.test
@@ -1048,6 +1048,8 @@ drop table t1;
--echo # MDEV-16473: query with CTE when no database is set
--echo #
+# Enable view protocol after fix MDEV-27944
+--disable_view_protocol
create database db_mdev_16473;
use db_mdev_16473;
drop database db_mdev_16473;
@@ -1071,6 +1073,7 @@ select * from cte, db_mdev_16473.t1 as t where cte.a=t.a;
drop database db_mdev_16473;
use test;
+--enable_view_protocol
--echo #
--echo # MDEV-17154: using parameter markers for PS within CTEs more than once
@@ -1217,6 +1220,8 @@ DROP TABLE test.t;
--echo # MDEV-22781: create view with CTE without default database
--echo #
+# Enable view protocol after fix MDEV-27944
+--disable_view_protocol
create database db;
use db;
drop database db;
@@ -1242,6 +1247,7 @@ drop table db1.t1;
drop database db1;
use test;
+--enable_view_protocol
--echo #
--echo # MDEV-24597: CTE with union used multiple times in query
diff --git a/mysql-test/main/ctype_big5.test b/mysql-test/main/ctype_big5.test
index 41991258886..246d7b0a40a 100644
--- a/mysql-test/main/ctype_big5.test
+++ b/mysql-test/main/ctype_big5.test
@@ -78,6 +78,8 @@ create table t1 (a blob);
insert into t1 values (0xEE00);
select * into outfile 'test/t1.txt' from t1;
delete from t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--eval select hex(load_file('$MYSQLD_DATADIR/test/t1.txt'));
@@ -85,7 +87,8 @@ load data infile 't1.txt' into table t1;
select hex(a) from t1;
--remove_file $MYSQLD_DATADIR/test/t1.txt
drop table t1;
-
+#enable_view_protocol
+#
--echo End of 5.0 tests
@@ -239,12 +242,14 @@ DROP TABLE t1;
#
# Checking binary->big5 conversion of an unassigned character 0xC840 in optimizer
#
+--disable_service_connection
SET NAMES binary;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET big5, KEY(a));
INSERT INTO t1 VALUES (0xC840),(0xC841),(0xC842);
SELECT HEX(a) FROM t1 WHERE a='È@';
SELECT HEX(a) FROM t1 IGNORE KEY(a) WHERE a='È@';
DROP TABLE t1;
+--enable_service_connection
--echo #
--echo # End of 10.0 tests
diff --git a/mysql-test/main/ctype_binary.test b/mysql-test/main/ctype_binary.test
index 4a0bb4a2b20..31880df6352 100644
--- a/mysql-test/main/ctype_binary.test
+++ b/mysql-test/main/ctype_binary.test
@@ -1,4 +1,7 @@
+#remove this include after fix MDEV-27871
+--source include/no_view_protocol.inc
+
set names binary;
--source include/ctype_numconv.inc
diff --git a/mysql-test/main/ctype_collate.test b/mysql-test/main/ctype_collate.test
index ce8559732ee..ab79a6cd51a 100644
--- a/mysql-test/main/ctype_collate.test
+++ b/mysql-test/main/ctype_collate.test
@@ -1,3 +1,6 @@
+#remove this include after fix MDEV-27871
+--source include/no_view_protocol.inc
+
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
diff --git a/mysql-test/main/ctype_cp932.test b/mysql-test/main/ctype_cp932.test
index 0f5ff437d33..d2ca278c739 100644
--- a/mysql-test/main/ctype_cp932.test
+++ b/mysql-test/main/ctype_cp932.test
@@ -4,6 +4,9 @@
--echo # USED.
--echo #
+#remove this include in 10.6 version
+--source include/no_view_protocol.inc
+
SET @old_character_set_client= @@character_set_client;
SET @old_character_set_connection= @@character_set_connection;
SET @old_character_set_results= @@character_set_results;
diff --git a/mysql-test/main/ctype_eucjpms.test b/mysql-test/main/ctype_eucjpms.test
index 6af72270853..1ea9eb801b0 100644
--- a/mysql-test/main/ctype_eucjpms.test
+++ b/mysql-test/main/ctype_eucjpms.test
@@ -1,3 +1,7 @@
+# remove this include in 10.6 version,
+# if MDEV-27871 will be fix
+--source include/no_view_protocol.inc
+
-- source include/have_eucjpms.inc
diff --git a/mysql-test/main/ctype_filename.test b/mysql-test/main/ctype_filename.test
index ba42d1a2807..bfafe4d437f 100644
--- a/mysql-test/main/ctype_filename.test
+++ b/mysql-test/main/ctype_filename.test
@@ -20,7 +20,10 @@ drop table com1;
create table `clock$` (a int);
drop table `clock$`;
+# Enable after fix MDEV-29295
+--disable_view_protocol
select convert(convert(',' using filename) using binary);
+--enable_view_protocol
--echo #
--echo # MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
diff --git a/mysql-test/main/ctype_gb2312.test b/mysql-test/main/ctype_gb2312.test
index 07460116ade..f78fbbab83c 100644
--- a/mysql-test/main/ctype_gb2312.test
+++ b/mysql-test/main/ctype_gb2312.test
@@ -7,6 +7,8 @@
drop table if exists t1;
--enable_warnings
+--disable_service_connection
+
SET @test_character_set= 'gb2312';
SET @test_collation= 'gb2312_chinese_ci';
-- source include/ctype_common.inc
@@ -177,6 +179,8 @@ let $coll='gb2312_nopad_bin';
let $coll_pad='gb2312_bin';
--source include/ctype_pad_all_engines.inc
+--enable_service_connection
+
--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/ctype_gbk.test b/mysql-test/main/ctype_gbk.test
index d68b78f847c..5c9f98ef61e 100644
--- a/mysql-test/main/ctype_gbk.test
+++ b/mysql-test/main/ctype_gbk.test
@@ -447,11 +447,13 @@ DROP TABLE t1;
--echo #
--echo # MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
set sql_mode='';
SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312));
SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8));
set sql_mode=default;
-
+--enable_view_protocol
--echo #
--echo # End of 10.1 tests
diff --git a/mysql-test/main/ctype_latin1_de.test b/mysql-test/main/ctype_latin1_de.test
index dc261790f6c..09cbcf0ad87 100644
--- a/mysql-test/main/ctype_latin1_de.test
+++ b/mysql-test/main/ctype_latin1_de.test
@@ -1,6 +1,10 @@
#
# Test latin_de character set
#
+
+# Enable after fix MDEV-27904 and not earlier version 10.6
+-- source include/no_view_protocol.inc
+
create database latin1_german2_ci default character set latin1 collate latin1_german2_ci;
use latin1_german2_ci;
diff --git a/mysql-test/main/ctype_latin2.test b/mysql-test/main/ctype_latin2.test
index e80515993f2..e71a60a2324 100644
--- a/mysql-test/main/ctype_latin2.test
+++ b/mysql-test/main/ctype_latin2.test
@@ -1,4 +1,3 @@
-
# Tests with the latin1 character set
#
--disable_warnings
@@ -61,7 +60,7 @@ drop table t1;
--echo #
--echo # WL#3664 WEIGHT_STRING
--echo #
-
+--disable_service_connection
set names latin2;
--source include/weight_string.inc
--source include/weight_string_l1.inc
@@ -70,6 +69,7 @@ set names latin2;
set collation_connection=latin2_bin;
--source include/weight_string.inc
--source include/weight_string_l1.inc
+--enable_service_connection
--echo #
--echo # End of 5.6 tests
diff --git a/mysql-test/main/ctype_latin2_ch.test b/mysql-test/main/ctype_latin2_ch.test
index 06ccd2c9782..6d3453ed1fb 100644
--- a/mysql-test/main/ctype_latin2_ch.test
+++ b/mysql-test/main/ctype_latin2_ch.test
@@ -30,10 +30,11 @@ select * from t1 where tt like '%AA%';
drop table t1;
# End of 4.1 tests
-
+--disable_service_connection
set names latin2 collate latin2_czech_cs;
--source include/ctype_pad_space.inc
--source include/ctype_like_cond_propagation.inc
+--enable_service_connection
# We can not use ctype_filesort.inc because
# order of SPACE and TAB is not strict
@@ -219,9 +220,10 @@ DROP TABLE t1;
--echo #
--echo # WL#3664 WEIGHT_STRING
--echo #
-
+--disable_service_connection
set names latin2 collate latin2_czech_cs;
--source include/ctype_pad_space.inc
+--enable_service_connection
# We can not use ctype_filesort.inc because
# order of SPACE and TAB is not strict
#--source include/ctype_filesort.inc
@@ -230,6 +232,8 @@ set names latin2 collate latin2_czech_cs;
--echo # Note:
--echo # latin2_czech_cs does not support WEIGHT_STRING in full extent
--echo #
+#check after fix MDEV-29290
+--disable_view_protocol
--source include/weight_string.inc
--source include/weight_string_chde.inc
--source include/weight_string_l1.inc
@@ -238,6 +242,7 @@ set names latin2 collate latin2_czech_cs;
--source include/weight_string_l4.inc
--source include/weight_string_l12.inc
--source include/weight_string_l14.inc
+--enable_view_protocol
--echo #
--echo # End of 5.6 tests
diff --git a/mysql-test/main/ctype_ldml.test b/mysql-test/main/ctype_ldml.test
index 155e584935b..2da99e89de5 100644
--- a/mysql-test/main/ctype_ldml.test
+++ b/mysql-test/main/ctype_ldml.test
@@ -3,6 +3,9 @@
--source include/have_utf16.inc
--source include/have_utf32.inc
+#remove this include after fix MDEV-27871
+--source include/no_view_protocol.inc
+
--disable_query_log
call mtr.add_suppression("Charset id.*trying to replace");
--enable_query_log
diff --git a/mysql-test/main/ctype_recoding.test b/mysql-test/main/ctype_recoding.test
index ba2e65b3626..cc58d4aeff9 100644
--- a/mysql-test/main/ctype_recoding.test
+++ b/mysql-test/main/ctype_recoding.test
@@ -74,11 +74,13 @@ SHOW TABLES IN òåñò;
SET CHARACTER SET koi8r;
DROP DATABASE ÔÅÓÔ;
+# Enable view protocol after fix MDEV-27944
+--disable_view_protocol
SET NAMES koi8r;
SELECT hex('ÔÅÓÔ');
SET character_set_connection=cp1251;
SELECT hex('ÔÅÓÔ');
-
+--enable_view_protocol
USE test;
# Bug#4417
@@ -94,9 +96,12 @@ DROP TABLE `теÑÑ‚`;
SET NAMES binary;
SET character_set_connection=utf8;
SELECT 'теÑÑ‚' as s;
+# enable view-protocol in 10.6 version
+--disable_view_protocol
SET NAMES utf8;
SET character_set_connection=binary;
SELECT 'теÑÑ‚' as s;
+--enable_view_protocol
# Bug#4417, another aspect:
# Check that both "SHOW CREATE TABLE" and "SHOW COLUMNS"
@@ -173,6 +178,8 @@ drop table t1;
#
# Check more automatic conversion
#
+# Enable view protocol after fix MDEV-28017
+--disable_view_protocol
set names koi8r;
create table t1 (c1 char(10) character set cp1251);
insert into t1 values ('ß');
@@ -197,7 +204,8 @@ select rpad(c1,3,'ö'), rpad('ö',3,c1) from t1;
#select case c1 when 'ß' then 'ß' when 'ö' then 'ö' else 'c' end from t1;
#select export_set(5,c1,'ö'), export_set(5,'ö',c1) from t1;
drop table t1;
-
+--enable_view_protocol
+
#
# Bug 20695: problem with field default value's character set
#
diff --git a/mysql-test/main/ctype_sjis.test b/mysql-test/main/ctype_sjis.test
index ecb870242c5..8fab40ff3a8 100644
--- a/mysql-test/main/ctype_sjis.test
+++ b/mysql-test/main/ctype_sjis.test
@@ -64,17 +64,21 @@ select hex(c) from t1;
drop table t1;
+--disable_service_connection
SET collation_connection='sjis_japanese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
-- source include/ctype_str_to_date.inc
+
+
SET collation_connection='sjis_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+--enable_service_connection
# Check parsing of string literals in SJIS with multibyte characters that
# have an embedded \ in them. (Bug #8303)
@@ -173,6 +177,8 @@ WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
--echo # WL#3090 Japanese Character Set adjustments
--echo # Test sjis->Unicode conversion
--echo #
+# enable view-protocol in 10.6 version
+--disable_view_protocol
SELECT HEX(a), HEX(CONVERT(a USING utf8)) as b FROM t1
WHERE a<>'' HAVING b<>'3F' ORDER BY code;
@@ -187,6 +193,7 @@ DROP TABLE t1;
SELECT HEX(a), HEX(CONVERT(a using sjis)) as b FROM t1 HAVING b<>'3F' ORDER BY BINARY a;
DROP TABLE t1;
+--enable_view_protocol
--echo #
--echo # End of 5.5 tests
@@ -201,6 +208,9 @@ DROP TABLE t1;
--echo # WL#3664 WEIGHT_STRING
--echo #
+# enable view-protocol after fix MDEV-27871
+--disable_view_protocol
+
set names sjis;
--source include/weight_string.inc
--source include/weight_string_l1.inc
@@ -212,6 +222,8 @@ set collation_connection=sjis_bin;
--source include/weight_string_l1.inc
--source include/weight_string_8140.inc
+--enable_view_protocol
+
--echo #
--echo # End of 5.6 tests
--echo #
@@ -220,13 +232,21 @@ set collation_connection=sjis_bin;
--echo # Start of 10.0 tests
--echo #
+# Tests will be skipped for the view protocol because the view protocol creates
+# an additional util connection and other statistics data
+# (it is necessary to run the view-protocol not in util session )
+--disable_view_protocol
+
let $ctype_unescape_combinations=selected;
--source include/ctype_unescape.inc
+
--character_set sjis
SET NAMES sjis;
--source include/ctype_E05C.inc
+--enable_view_protocol
+
--echo #
--echo # End of 10.0 tests
diff --git a/mysql-test/main/ctype_swe7.test b/mysql-test/main/ctype_swe7.test
index a8d79935aa6..d2f59084342 100644
--- a/mysql-test/main/ctype_swe7.test
+++ b/mysql-test/main/ctype_swe7.test
@@ -11,9 +11,16 @@ SET NAMES swe7;
# as uses stored functions actively.
#
+# Tests will be skipped for the view protocol because the view protocol creates
+# an additional util connection and other statistics data
+# (it is necessary to run the view-protocol not in util session )
+--disable_service_connection
+
let $ctype_unescape_combinations=selected;
--source include/ctype_unescape.inc
+--enable_service_connection
+
--echo #
--echo # End of 10.0 tests
--echo #
diff --git a/mysql-test/main/ctype_tis620.test b/mysql-test/main/ctype_tis620.test
index 7f6382fe7bc..f432b23d71c 100644
--- a/mysql-test/main/ctype_tis620.test
+++ b/mysql-test/main/ctype_tis620.test
@@ -169,7 +169,7 @@ SET collation_connection='tis620_bin';
--echo #
--echo # Start of 5.6 tests
--echo #
-
+--disable_service_connection
--echo #
--echo # WL#3664 WEIGHT_STRING
--echo #
@@ -186,8 +186,11 @@ set collation_connection=tis620_bin;
--source include/weight_string.inc
--source include/weight_string_l1.inc
--source include/ctype_pad_space.inc
+#enable after fix MDEV-29290
+--disable_view_protocol
select hex(weight_string(cast(0xE0A1 as char)));
select hex(weight_string(cast(0xE0A1 as char) as char(1)));
+--enable_view_protocol
--echo #
--echo # End of 5.6 tests
@@ -208,6 +211,7 @@ let $coll_pad='tis620_thai_ci';
let $coll='tis620_nopad_bin';
let $coll_pad='tis620_bin';
--source include/ctype_pad_all_engines.inc
+--enable_service_connection
--echo #
--echo # MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV in row_merge_fts_doc_tokenize, stack smashing
diff --git a/mysql-test/main/ctype_uca.test b/mysql-test/main/ctype_uca.test
index 67ef7d7aa96..bc08714367b 100644
--- a/mysql-test/main/ctype_uca.test
+++ b/mysql-test/main/ctype_uca.test
@@ -8,6 +8,7 @@ DROP TABLE IF EXISTS t1;
#
# Test Unicode collations.
#
+--disable_service_connection
set names utf8;
#
@@ -72,6 +73,7 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_520
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_vietnamese_ci;
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_thai_520_w2;
+--disable_view_protocol
ALTER TABLE t1 CONVERT TO CHARACTER SET ucs2 COLLATE ucs2_bin;
SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_unicode_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_icelandic_ci;
@@ -96,7 +98,7 @@ SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_croatian_ci
SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_german2_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_unicode_520_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_vietnamese_ci;
-
+--enable_view_protocol
drop table t1;
#
@@ -475,7 +477,7 @@ set collation_connection=ucs2_unicode_ci;
-- source include/ctype_regex.inc
-- source include/ctype_like_range_f1f2.inc
set names utf8;
-
+--enable_service_connection
-- echo End for 5.0 tests
--echo End of 5.1 tests
@@ -491,7 +493,7 @@ SET collation_connection=utf8_czech_ci;
SET collation_connection=ucs2_czech_ci;
--source include/ctype_czech.inc
--source include/ctype_like_ignorable.inc
-
+--disable_service_connection
create table t1 (a int, c1 varchar(200) collate utf8_croatian_mysql561_ci, key (c1));
insert into t1 values (1,'=> DZ'),(2,'=> Dz'),(3,'=> dz'),(4,'=> dZ');
insert into t1 values (5,'=> DŽ'),(6,'=> Dž'),(7,'=> dž'),(8,'=> dŽ');
@@ -508,7 +510,6 @@ select * from t1 where c1 = '=> dž';
select * from t1 where concat(c1) = '=> dž';
drop table t1;
-
--echo #
--echo # MDEV-7649 wrong result when comparing utf8 column with an invalid literal
--echo #
@@ -551,7 +552,10 @@ set @@collation_connection=ucs2_czech_ci;
--echo #
--echo # Bug#33077 weight of supplementary characters is not 0xfffd
--echo #
+#enable_after_fix MDEV-27871
+--disable_view_protocol
select hex(weight_string(_utf8mb4 0xF0908080 /* U+10000 */ collate utf8mb4_unicode_ci));
+--enable_view_protocol
--echo #
--echo # Bug#53064 garbled data when using utf8_german2_ci collation
@@ -690,7 +694,7 @@ CREATE VIEW v1 AS SELECT group_concat('f') AS col1;
SELECT col1 FROM v1 UNION SELECT col1 FROM t1;
DROP VIEW v1;
DROP TABLE t1;
-
+--enable_service_connection
--echo #
--echo # End of MariaDB-10.2 tests
diff --git a/mysql-test/main/ctype_uca_innodb.test b/mysql-test/main/ctype_uca_innodb.test
index 3582740d60e..f51f40118e9 100644
--- a/mysql-test/main/ctype_uca_innodb.test
+++ b/mysql-test/main/ctype_uca_innodb.test
@@ -1,7 +1,6 @@
#
# Tests for UCA collations with InnoDB
#
-
let collation=utf8mb3_unicode_ci;
--source include/have_collation.inc
--source include/have_innodb.inc
@@ -15,10 +14,11 @@ let collation=utf8mb3_unicode_ci;
--echo #
--echo # MDEV-7649 wrong result when comparing utf8 column with an invalid literal
--echo #
-
+--disable_service_connection
SET NAMES utf8 COLLATE utf8_unicode_ci;
--let ENGINE=InnoDB
--source include/ctype_utf8_ilseq.inc
+--enable_service_connection
--echo #
--echo # End of 5.5 tests
diff --git a/mysql-test/main/ctype_ujis.test b/mysql-test/main/ctype_ujis.test
index 72a609edf39..8b0ba671abc 100644
--- a/mysql-test/main/ctype_ujis.test
+++ b/mysql-test/main/ctype_ujis.test
@@ -37,7 +37,12 @@ select locate(_ujis 0xa1a3,_ujis 0xa1a2a1a3);
select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%');
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%');
+
+# enable view-protocol after fix MDEV-27871
+--disable_view_protocol
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin;
+--disable_view_protocol
+
select 'a' like 'a';
select 'A' like 'a';
select 'A' like 'a' collate ujis_bin;
@@ -1216,9 +1221,11 @@ DROP TABLE t2;
--echo #
--echo # Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SET NAMES utf8;
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
-
+--enable_view_protocol
set names default;
set character_set_database=@save_character_set_server;
@@ -1307,6 +1314,10 @@ WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
--echo # WL#3090 Japanese Character Set adjustments
--echo # Test sjis->Unicode conversion
--echo #
+
+# enable view-protocol in 10.6 version
+--disable_view_protocol
+
SELECT HEX(a), HEX(CONVERT(a USING utf8)) as b FROM t1
WHERE a<>'' HAVING b<>'3F' ORDER BY code;
@@ -1321,7 +1332,7 @@ DROP TABLE t1;
SELECT HEX(a), HEX(CONVERT(a using sjis)) as b FROM t1 HAVING b<>'3F' ORDER BY BINARY a;
DROP TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # End of 5.5 tests
@@ -1336,6 +1347,8 @@ DROP TABLE t1;
--echo # WL#3664 WEIGHT_STRING
--echo #
+# enable view-protocol after fix MDEV-27871
+--disable_view_protocol
set names ujis;
--source include/weight_string.inc
--source include/weight_string_l1.inc
@@ -1349,6 +1362,7 @@ set collation_connection=ujis_bin;
--source include/weight_string_A1A1.inc
--source include/weight_string_8EA1.inc
--source include/weight_string_8FA2C3.inc
+--enable_view_protocol
--echo #
--echo # End of 5.6 tests
diff --git a/mysql-test/main/ctype_upgrade.test b/mysql-test/main/ctype_upgrade.test
index 62567c5afe4..fee962e7ceb 100644
--- a/mysql-test/main/ctype_upgrade.test
+++ b/mysql-test/main/ctype_upgrade.test
@@ -85,13 +85,15 @@ DROP TABLE maria050533_xxx_croatian_ci;
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYI
ALTER TABLE maria050533_xxx_croatian_ci FORCE;
SHOW CREATE TABLE maria050533_xxx_croatian_ci;
+# enable after fix MDEV-28571
+--disable_view_protocol
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050533_xxx_croatian_ci GROUP BY a;
SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM maria050533_xxx_croatian_ci GROUP BY b;
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM maria050533_xxx_croatian_ci GROUP BY c;
SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM maria050533_xxx_croatian_ci GROUP BY d;
SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM maria050533_xxx_croatian_ci GROUP BY e;
DROP TABLE maria050533_xxx_croatian_ci;
-
+--enable_view_protocol
--echo #
--echo # Upgrade from Maria-10.0.4
@@ -116,13 +118,15 @@ DROP TABLE maria100004_xxx_croatian_ci;
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYI
ALTER TABLE maria100004_xxx_croatian_ci FORCE;
SHOW CREATE TABLE maria100004_xxx_croatian_ci;
+# enable after fix MDEV-28571
+--disable_view_protocol
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria100004_xxx_croatian_ci GROUP BY a;
SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM maria100004_xxx_croatian_ci GROUP BY b;
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM maria100004_xxx_croatian_ci GROUP BY c;
SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM maria100004_xxx_croatian_ci GROUP BY d;
SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM maria100004_xxx_croatian_ci GROUP BY e;
DROP TABLE maria100004_xxx_croatian_ci;
-
+--enable_view_protocol
--echo #
@@ -137,13 +141,15 @@ DROP TABLE maria100004_xxx_croatian_ci;
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.MYI
CHECK TABLE mysql050614_xxx_croatian_ci FOR UPGRADE;
SHOW CREATE TABLE mysql050614_xxx_croatian_ci;
+# enable after fix MDEV-28571
+--disable_view_protocol
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM mysql050614_xxx_croatian_ci GROUP BY a;
SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM mysql050614_xxx_croatian_ci GROUP BY b;
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM mysql050614_xxx_croatian_ci GROUP BY c;
SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM mysql050614_xxx_croatian_ci GROUP BY d;
SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM mysql050614_xxx_croatian_ci GROUP BY e;
DROP TABLE mysql050614_xxx_croatian_ci;
-
+--enable_view_protocol
--echo #
--echo # Checking mysql_upgrade
diff --git a/mysql-test/main/ctype_utf16.test b/mysql-test/main/ctype_utf16.test
index c2807a19215..d95bc2ed76e 100644
--- a/mysql-test/main/ctype_utf16.test
+++ b/mysql-test/main/ctype_utf16.test
@@ -1,7 +1,6 @@
-- source include/have_utf16.inc
-- source include/have_utf8mb4.inc
-
SET TIME_ZONE='+03:00';
--disable_warnings
@@ -11,6 +10,7 @@ DROP TABLE IF EXISTS t1;
--echo #
--echo # Start of 5.5 tests
--echo #
+--disable_service_connection
SET NAMES latin1;
SET character_set_connection=utf16;
@@ -52,6 +52,8 @@ DROP TABLE t1;
#
# Check LPAD/RPAD
#
+#enable after fix MDEV-29290
+--disable_view_protocol
SELECT hex(LPAD(_utf16 X'0420',10,_utf16 X'0421'));
SELECT hex(LPAD(_utf16 X'0420',10,_utf16 X'04210422'));
SELECT hex(LPAD(_utf16 X'0420',10,_utf16 X'042104220423'));
@@ -65,6 +67,7 @@ SELECT hex(RPAD(_utf16 X'0420',10,_utf16 X'042104220423'));
SELECT hex(RPAD(_utf16 X'0420042104220423042404250426042704280429042A042B',10,_utf16 X'042104220423'));
SELECT hex(RPAD(_utf16 X'D800DC00', 10, _utf16 X'0421'));
SELECT hex(RPAD(_utf16 X'0421', 10, _utf16 X'D800DC00'));
+--enable_view_protocol
CREATE TABLE t1 SELECT
LPAD(_utf16 X'0420',10,_utf16 X'0421') l,
@@ -738,6 +741,7 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf16,
s4 LONGTEXT CHARACTER SET utf16
);
+--disable_view_protocol
--enable_metadata
SET NAMES utf8, @@character_set_results=NULL;
SELECT *, HEX(s1) FROM t1;
@@ -746,6 +750,7 @@ SELECT *, HEX(s1) FROM t1;
SET NAMES utf8;
SELECT *, HEX(s1) FROM t1;
--disable_metadata
+--enable_view_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2;
DROP TABLE t1, t2;
@@ -950,7 +955,7 @@ DROP TABLE t1;
VALUES (1) UNION SELECT _utf16 0x0020;
VALUES ('') UNION SELECT _utf16 0x0020 COLLATE utf16_bin;
VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
-
+--enable_service_connection
--echo #
--echo # End of 10.3 tests
diff --git a/mysql-test/main/ctype_utf16_uca.test b/mysql-test/main/ctype_utf16_uca.test
index cb00ccc0c61..9dff7b10c16 100644
--- a/mysql-test/main/ctype_utf16_uca.test
+++ b/mysql-test/main/ctype_utf16_uca.test
@@ -9,6 +9,7 @@ DROP TABLE IF EXISTS t1;
--echo # Start of 5.5 tests
--echo #
+--disable_service_connection
set names utf8;
set collation_connection=utf16_unicode_ci;
select hex('a'), hex('a ');
@@ -267,7 +268,7 @@ INSERT INTO t1 (c) VALUES (1);
SELECT HEX(c) FROM t1;
DROP TABLE t1;
-
+--enable_service_connection
--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/ctype_utf16le.test b/mysql-test/main/ctype_utf16le.test
index e3163d2f73e..537a456f7db 100644
--- a/mysql-test/main/ctype_utf16le.test
+++ b/mysql-test/main/ctype_utf16le.test
@@ -3,6 +3,8 @@
-- source include/have_utf32.inc
-- source include/have_utf8mb4.inc
+--disable_service_connection
+
let $MYSQLD_DATADIR= `select @@datadir`;
SET TIME_ZONE='+03:00';
@@ -701,6 +703,7 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf16le,
s4 LONGTEXT CHARACTER SET utf16le
);
+--disable_view_protocol
--enable_metadata
SET NAMES utf8, @@character_set_results=NULL;
SELECT *, HEX(s1) FROM t1;
@@ -709,6 +712,7 @@ SELECT *, HEX(s1) FROM t1;
SET NAMES utf8;
SELECT *, HEX(s1) FROM t1;
--disable_metadata
+--enable_view_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2;
DROP TABLE t1, t2;
@@ -846,6 +850,7 @@ SELECT TABLE_NAME, TABLE_SCHEMA, HEX(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES
DROP TABLE t;
SET NAMES utf8;
+--enable_service_connection
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/main/ctype_utf32.test b/mysql-test/main/ctype_utf32.test
index 0e50405f871..1ef1214d756 100644
--- a/mysql-test/main/ctype_utf32.test
+++ b/mysql-test/main/ctype_utf32.test
@@ -1,6 +1,7 @@
-- source include/have_utf32.inc
-- source include/have_utf8mb4.inc
+--disable_service_connection
SET TIME_ZONE = '+03:00';
--disable_warnings
@@ -62,12 +63,18 @@ DROP TABLE t1;
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0421'));
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'));
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'));
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT hex(LPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'));
+--enable_view_protocol
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0421'));
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'));
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'));
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT hex(RPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'));
+--enable_view_protocol
CREATE TABLE t1 SELECT
LPAD(_utf32 X'0420',10,_utf32 X'0421') l,
@@ -117,8 +124,11 @@ DROP TABLE t1;
#
# Check that INSERT() works fine.
# This invokes charpos() function.
+#enable after fix MDEV-27871
+--disable_view_protocol
select insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066);
select insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066);
+--enable_view_protocol
#######################################################
@@ -794,6 +804,7 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf32,
s4 LONGTEXT CHARACTER SET utf32
);
+--disable_view_protocol
--enable_metadata
SET NAMES utf8mb4, @@character_set_results=NULL;
SELECT *, HEX(s1) FROM t1;
@@ -802,6 +813,7 @@ SELECT *, HEX(s1) FROM t1;
SET NAMES utf8mb4;
SELECT *, HEX(s1) FROM t1;
--disable_metadata
+--enable_view_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2;
DROP TABLE t1, t2;
@@ -872,8 +884,10 @@ ORDER BY l DESC;
--echo #
--echo # incorrect charset for val_str_ascii
--echo #
-
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second;
+--enable_view_protocol
--echo #
--echo # MDEV-5745 analyze MySQL fix for bug#12368495
@@ -1085,7 +1099,7 @@ CREATE TABLE t1 (
SHOW CREATE TABLE t1;
DROP TABLE t1;
-
+--enable_service_connection
--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/ctype_utf32_uca.test b/mysql-test/main/ctype_utf32_uca.test
index 9a6fc3260b0..658a03abacb 100644
--- a/mysql-test/main/ctype_utf32_uca.test
+++ b/mysql-test/main/ctype_utf32_uca.test
@@ -8,6 +8,7 @@ DROP TABLE IF EXISTS t1;
--echo #
--echo # Start of 5.5 tests
--echo #
+--disable_service_connection
set names utf8;
set collation_connection=utf32_unicode_ci;
@@ -303,6 +304,7 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
SET NAMES utf8;
+--enable_service_connection
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/main/ctype_utf8.test b/mysql-test/main/ctype_utf8.test
index 844e812acb3..f6059e244ff 100644
--- a/mysql-test/main/ctype_utf8.test
+++ b/mysql-test/main/ctype_utf8.test
@@ -2,6 +2,9 @@
# Tests with the utf8 character set
#
+# Enable after fix MDEV-27904
+-- source include/no_view_protocol.inc
+
let $MYSQLD_DATADIR= `select @@datadir`;
let collation=utf8mb3_unicode_ci;
diff --git a/mysql-test/main/ctype_utf8mb4.test b/mysql-test/main/ctype_utf8mb4.test
index 5640bc45ed1..c0c5568b3bd 100644
--- a/mysql-test/main/ctype_utf8mb4.test
+++ b/mysql-test/main/ctype_utf8mb4.test
@@ -1,3 +1,6 @@
+# Enable after fix MDEV-27904
+-- source include/no_view_protocol.inc
+
--source include/have_utf8mb4.inc
#
diff --git a/mysql-test/main/ctype_utf8mb4_innodb.test b/mysql-test/main/ctype_utf8mb4_innodb.test
index 3bf0612a1ab..75667e04d5f 100644
--- a/mysql-test/main/ctype_utf8mb4_innodb.test
+++ b/mysql-test/main/ctype_utf8mb4_innodb.test
@@ -1,3 +1,6 @@
+# Enable after fix MDEV-27904
+-- source include/no_view_protocol.inc
+
--source include/have_utf8mb4.inc
--source include/have_innodb.inc
diff --git a/mysql-test/main/custom_aggregate_functions.test b/mysql-test/main/custom_aggregate_functions.test
index 4b6129b5974..78374684290 100644
--- a/mysql-test/main/custom_aggregate_functions.test
+++ b/mysql-test/main/custom_aggregate_functions.test
@@ -1,3 +1,6 @@
+# Check tests after fix MDEV-28475
+-- source include/no_view_protocol.inc
+
create table t2 (sal int(10));
delimiter |;
diff --git a/mysql-test/main/custom_aggregates_i_s.test b/mysql-test/main/custom_aggregates_i_s.test
index 11ed26c59b0..c6b195f7974 100644
--- a/mysql-test/main/custom_aggregates_i_s.test
+++ b/mysql-test/main/custom_aggregates_i_s.test
@@ -1,3 +1,6 @@
+# enable view-protocol after fix MDEV-28475
+-- source include/no_view_protocol.inc
+
--source include/default_optimizer_switch.inc
flush status;
diff --git a/mysql-test/main/date_formats.test b/mysql-test/main/date_formats.test
index 3bf6fabbf6d..4f252f29a69 100644
--- a/mysql-test/main/date_formats.test
+++ b/mysql-test/main/date_formats.test
@@ -2,6 +2,9 @@
# Test of date format functions
#
+#remove this include after fix MDEV-27871
+-- source include/no_view_protocol.inc
+
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/mysql-test/main/ddl_i18n_koi8r.test b/mysql-test/main/ddl_i18n_koi8r.test
index 70e7e2e81ca..4f16cbaba6b 100644
--- a/mysql-test/main/ddl_i18n_koi8r.test
+++ b/mysql-test/main/ddl_i18n_koi8r.test
@@ -42,6 +42,7 @@ let collation=utf8mb3_unicode_ci;
--source include/have_collation.inc
###########################################################################
+--disable_service_connection
set names koi8r;
delimiter |;
@@ -1119,3 +1120,4 @@ delimiter ;|
USE test;
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
+--enable_service_connection
diff --git a/mysql-test/main/ddl_i18n_utf8.test b/mysql-test/main/ddl_i18n_utf8.test
index 35b341ddc80..1f9690e7dac 100644
--- a/mysql-test/main/ddl_i18n_utf8.test
+++ b/mysql-test/main/ddl_i18n_utf8.test
@@ -42,6 +42,7 @@ let collation=utf8mb3_unicode_ci;
--source include/have_collation.inc
###########################################################################
+--disable_service_connection
set names utf8;
delimiter |;
@@ -1122,3 +1123,4 @@ delimiter ;|
USE test;
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
+--enable_service_connection
diff --git a/mysql-test/main/delayed.test b/mysql-test/main/delayed.test
index cac433efd84..a99af07232c 100644
--- a/mysql-test/main/delayed.test
+++ b/mysql-test/main/delayed.test
@@ -309,6 +309,7 @@ DROP TABLE t1,t2;
# Bug#40536: SELECT is blocked by INSERT DELAYED waiting on upgrading lock,
# even with low_priority_updates
#
+--disable_service_connection
set @old_delayed_updates = @@global.low_priority_updates;
set global low_priority_updates = 1;
@@ -344,7 +345,7 @@ select * from t1;
drop table t1;
set global low_priority_updates = @old_delayed_updates;
-
+--enable_service_connection
--echo #
--echo # Bug #47682 strange behaviour of INSERT DELAYED
@@ -414,6 +415,7 @@ DROP TABLE t1;
--echo # This test is not supposed to work under --ps-protocol since
--echo # INSERT DELAYED doesn't work under LOCK TABLES with this protocol.
--disable_ps_protocol
+--disable_view_protocol
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
@@ -563,11 +565,12 @@ disconnect con1;
connection default;
DROP TABLE t1, t2, t3;
--enable_ps_protocol
-
+--enable_view_protocol
--echo #
--echo # Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
--echo #
+--disable_view_protocol
connect (con1,localhost,root,,);
connection default;
--disable_warnings
@@ -608,6 +611,7 @@ disconnect con1;
--source include/wait_until_disconnected.inc
connection default;
drop tables tm, t1, t2;
+--enable_view_protocol
--echo #
--echo # MDEV-9621 INSERT DELAYED fails on insert for tables with many columns
diff --git a/mysql-test/main/derived_view.test b/mysql-test/main/derived_view.test
index 006bdaea5ef..caccc7dafa1 100644
--- a/mysql-test/main/derived_view.test
+++ b/mysql-test/main/derived_view.test
@@ -1,3 +1,5 @@
+--source include/no_view_protocol.inc
+
--source include/default_optimizer_switch.inc
--disable_warnings
diff --git a/mysql-test/main/drop.test b/mysql-test/main/drop.test
index 45ff7f364f4..5185ce30db0 100644
--- a/mysql-test/main/drop.test
+++ b/mysql-test/main/drop.test
@@ -98,7 +98,8 @@ drop table t1;
# removing of database name from cache" reappeared in 5.1 as bug#19403
# In its case crash happened when one concurrently executed DROP DATABASE
# and one of name-locking command.
-#
+#
+--disable_service_connection
--disable_warnings
drop database if exists mysqltest;
drop table if exists t1;
@@ -127,6 +128,7 @@ connection addconroot1;
disconnect addconroot1;
--source include/wait_until_disconnected.inc
connection default;
+--enable_service_connection
#
# Bug#25858 Some DROP TABLE under LOCK TABLES can cause deadlocks
diff --git a/mysql-test/main/dyncol.test b/mysql-test/main/dyncol.test
index 206c78a8775..493e9b3842d 100644
--- a/mysql-test/main/dyncol.test
+++ b/mysql-test/main/dyncol.test
@@ -1,6 +1,8 @@
#
# Dynamic column function test
#
+# enable view-protocol after fix MDEV-27871
+-- source include/no_view_protocol.inc
--source include/default_charset.inc
diff --git a/mysql-test/main/events_2.test b/mysql-test/main/events_2.test
index 2012f94e9f2..cd0d908b870 100644
--- a/mysql-test/main/events_2.test
+++ b/mysql-test/main/events_2.test
@@ -3,6 +3,8 @@
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
+--disable_service_connection
+
set sql_mode="";
--source include/default_charset.inc
@@ -523,3 +525,4 @@ let $wait_condition=
--source include/wait_condition.inc
drop database events_test;
+--enable_service_connection
diff --git a/mysql-test/main/events_bugs.test b/mysql-test/main/events_bugs.test
index ab45446667e..fe744de86c9 100644
--- a/mysql-test/main/events_bugs.test
+++ b/mysql-test/main/events_bugs.test
@@ -1,3 +1,7 @@
+# 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
+
#### t/events_bugs.test
#
# Last change:
diff --git a/mysql-test/main/events_grant.test b/mysql-test/main/events_grant.test
index 0c89e9d1f6c..cd5b6911542 100644
--- a/mysql-test/main/events_grant.test
+++ b/mysql-test/main/events_grant.test
@@ -2,7 +2,7 @@
-- source include/not_embedded.inc
--source include/default_charset.inc
-
+--disable_service_connection
CREATE DATABASE IF NOT EXISTS events_test;
use events_test;
#
@@ -113,3 +113,4 @@ DROP DATABASE events_test2;
--source include/check_events_off.inc
DROP DATABASE events_test;
+--enable_service_connection
diff --git a/mysql-test/main/events_logs_tests.test b/mysql-test/main/events_logs_tests.test
index 7cd664b30df..f7445352079 100644
--- a/mysql-test/main/events_logs_tests.test
+++ b/mysql-test/main/events_logs_tests.test
@@ -1,5 +1,6 @@
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
+-- source include/no_view_protocol.inc
set @save_long_query_time=@@long_query_time;
--disable_warnings
diff --git a/mysql-test/main/events_trans.test b/mysql-test/main/events_trans.test
index eea24f19577..cc83fa6e578 100644
--- a/mysql-test/main/events_trans.test
+++ b/mysql-test/main/events_trans.test
@@ -3,6 +3,7 @@
#
-- source include/have_innodb.inc
-- source include/not_embedded.inc
+-- source include/no_view_protocol.inc
set sql_mode="";
diff --git a/mysql-test/main/fast_prefix_index_fetch_innodb.test b/mysql-test/main/fast_prefix_index_fetch_innodb.test
index cb7ec642fe3..52066e96117 100644
--- a/mysql-test/main/fast_prefix_index_fetch_innodb.test
+++ b/mysql-test/main/fast_prefix_index_fetch_innodb.test
@@ -1,4 +1,5 @@
-- source include/have_innodb.inc
+--disable_service_connection
SET @save_opt= @@GLOBAL.innodb_prefix_index_cluster_optimization;
set global innodb_prefix_index_cluster_optimization = ON;
@@ -721,3 +722,4 @@ DROP TABLE wp_blogs;
SET GLOBAL innodb_prefix_index_cluster_optimization = @save_opt;
SET GLOBAL innodb_stats_persistent = @save_innodb_stats_persistent;
+--enable_service_connection
diff --git a/mysql-test/main/fix_priv_tables.test b/mysql-test/main/fix_priv_tables.test
index 293d3915a05..382417a6b10 100644
--- a/mysql-test/main/fix_priv_tables.test
+++ b/mysql-test/main/fix_priv_tables.test
@@ -1,5 +1,6 @@
# Embedded server doesn't support external clients
--source include/not_embedded.inc
+--source include/no_view_protocol.inc
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
diff --git a/mysql-test/main/flush-innodb.test b/mysql-test/main/flush-innodb.test
index 309ec5de014..7665ae5e077 100644
--- a/mysql-test/main/flush-innodb.test
+++ b/mysql-test/main/flush-innodb.test
@@ -1,5 +1,9 @@
--source include/have_innodb.inc
+# 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
+
# MDEV-254: Server hang with FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT
FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
UNLOCK TABLES;
diff --git a/mysql-test/main/flush.test b/mysql-test/main/flush.test
index d31c7591cbf..841c7f182b6 100644
--- a/mysql-test/main/flush.test
+++ b/mysql-test/main/flush.test
@@ -1,3 +1,5 @@
+--disable_service_connection
+
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
@@ -420,6 +422,7 @@ drop table t1;
--echo # Bug#52117 Pending FLUSH TALBES <list> aborts
--echo # transactions unnecessarily.
--echo #
+--disable_view_protocol
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -495,7 +498,7 @@ disconnect con2;
--source include/wait_until_disconnected.inc
connection default;
drop table t1;
-
+--enable_view_protocol
--echo #
--echo # Test for bug #55273 "FLUSH TABLE tm WITH READ LOCK for Merge table
@@ -533,6 +536,7 @@ drop tables tm, t1, t2;
--echo # Test for bug #57006 "Deadlock between HANDLER and
--echo # FLUSH TABLES WITH READ LOCK".
--echo #
+--disable_view_protocol
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
@@ -575,7 +579,7 @@ disconnect con2;
--source include/wait_until_disconnected.inc
connection default;
drop tables t1, t2;
-
+--enable_view_protocol
--echo #
--echo # Bug#57649 FLUSH TABLES under FLUSH TABLES <list> WITH READ LOCK leads
@@ -668,7 +672,7 @@ UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1;
-
+--enable_service_connection
--echo #
--echo # MDEV-15888 Implement FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK for views.
--echo #
diff --git a/mysql-test/main/flush_logs_not_windows.test b/mysql-test/main/flush_logs_not_windows.test
index af50e4bb9e8..ff30062b3a3 100644
--- a/mysql-test/main/flush_logs_not_windows.test
+++ b/mysql-test/main/flush_logs_not_windows.test
@@ -1,3 +1,7 @@
+# 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
+
source include/not_windows.inc;
source include/not_embedded.inc;
#
diff --git a/mysql-test/main/flush_table.test b/mysql-test/main/flush_table.test
index e4fc1b0c39f..91047c2d9d3 100644
--- a/mysql-test/main/flush_table.test
+++ b/mysql-test/main/flush_table.test
@@ -6,6 +6,9 @@
# Should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc
+
+--disable_service_connection
+
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
@@ -59,6 +62,7 @@ select * from t1;
connection default;
drop table t1;
disconnect locker;
+--enable_service_connection
#
# In the following test FLUSH TABLES produces a deadlock
diff --git a/mysql-test/main/fulltext.test b/mysql-test/main/fulltext.test
index c7aeae3fa31..487c2f151b0 100644
--- a/mysql-test/main/fulltext.test
+++ b/mysql-test/main/fulltext.test
@@ -278,6 +278,7 @@ drop table t1;
#
# UTF8
#
+--disable_service_connection
SET NAMES latin1;
CREATE TABLE t1 (t text character set utf8 not null, fulltext(t));
INSERT t1 VALUES ('Mit freundlichem Grüß'), ('aus Osnabrück');
@@ -298,7 +299,7 @@ alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
DROP TABLE t1;
-
+--enable_service_connection
#
# bug#3964
#
@@ -655,6 +656,7 @@ DROP TABLE t1;
--echo #
--echo # MDEV-6146 Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH
--echo #
+--disable_service_connection
SET NAMES utf8;
CREATE TABLE t1
(
@@ -682,7 +684,7 @@ INSERT INTO t1 VALUES ('nnn5 x5 y5 ööö5','mmm5 ');
SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ööö1' IN BOOLEAN MODE);
SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ùùù2' IN BOOLEAN MODE);
DROP TABLE t1;
-
+--enable_service_connection
--echo #
--echo # MDEV-14743: Server crashes in Item_func_match::init_search
@@ -691,7 +693,10 @@ DROP TABLE t1;
CREATE TABLE t1 (f VARCHAR(8));
INSERT INTO t1 VALUES ('foo'),('bar');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT 'foo' IN ( SELECT f FROM t1 GROUP BY MATCH(f) AGAINST ( 'qux' IN BOOLEAN MODE ) );
+--enable_view_protocol
SELECT 'foo' IN ( SELECT f FROM t1 GROUP BY MATCH(f) AGAINST ( 'qux' IN BOOLEAN MODE )) as f1, MATCH(f) AGAINST ( 'qux' IN BOOLEAN MODE ) as f2 from t1 ;
explain extended
SELECT 'foo' IN ( SELECT f FROM t1 GROUP BY MATCH(f) AGAINST ( 'qux' IN BOOLEAN MODE )) as f1, MATCH(f) AGAINST ( 'qux' IN BOOLEAN MODE ) as f2 from t1 ;
diff --git a/mysql-test/main/fulltext2.test b/mysql-test/main/fulltext2.test
index dc7af398bb6..e8b613bcb03 100644
--- a/mysql-test/main/fulltext2.test
+++ b/mysql-test/main/fulltext2.test
@@ -232,9 +232,12 @@ set names latin1;
#
# BUG#19580 - FULLTEXT search produces wrong results on UTF-8 columns
#
+--disable_service_connection
SET NAMES utf8;
CREATE TABLE t1(a VARCHAR(255), FULLTEXT(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES('„MySQL“');
SELECT a FROM t1 WHERE MATCH a AGAINST('“MySQL„' IN BOOLEAN MODE);
DROP TABLE t1;
SET NAMES latin1;
+--enable_service_connection
+
diff --git a/mysql-test/main/fulltext_left_join.test b/mysql-test/main/fulltext_left_join.test
index 3a81c1a5d1b..8d08fba4301 100644
--- a/mysql-test/main/fulltext_left_join.test
+++ b/mysql-test/main/fulltext_left_join.test
@@ -26,8 +26,11 @@ INSERT INTO t2 VALUES('456', 'lui');
select round(match(t1.texte,t1.sujet,t1.motsclefs) against('droit'),5)
from t1 left join t2 on t2.id=t1.id;
+#enable after fix MDEV-27871
+--disable_view_protocol
select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
from t1 left join t2 on t2.id=t1.id;
+--enable_view_protocol
drop table t1, t2;
diff --git a/mysql-test/main/func_compress.test b/mysql-test/main/func_compress.test
index 2a6c0276705..f41a5898154 100644
--- a/mysql-test/main/func_compress.test
+++ b/mysql-test/main/func_compress.test
@@ -48,6 +48,9 @@ drop table t1;
# note that when LOW_MEMORY is set the "test" below is meaningless
#
+#view protocol generates additional warning
+--disable_view_protocol
+
set @@global.max_allowed_packet=1048576*100;
--replace_result "''" XXX "'1'" XXX
@@ -59,6 +62,8 @@ disconnect newconn;
connection default;
set @@global.max_allowed_packet=@save_max_allowed_packet;
+--enable_view_protocol
+
#
# Bug #18643: problem with null values
#
@@ -185,7 +190,9 @@ DROP TABLE t1;
--echo #
--echo # MDEV-23149 Server crashes in my_convert / ErrConvString::ptr / Item_char_typecast::check_truncation_with_warn
--echo #
+--disable_view_protocol
select 'foo' in (cast(compress('bar') as char(4)), 'qux');
+--enable_view_protocol
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/main/func_concat.test b/mysql-test/main/func_concat.test
index e1bda4be29e..070d341cb2d 100644
--- a/mysql-test/main/func_concat.test
+++ b/mysql-test/main/func_concat.test
@@ -56,10 +56,16 @@ select 'a' union select concat('a', -0.0000);
#
# Bug#16716: subselect in concat() may lead to a wrong result
#
+
+#enable after fix MDEV-27871
+--disable_view_protocol
+
select concat((select x from (select 'a' as x) as t1 ),
(select y from (select 'b' as y) as t2 )) from (select 1 union select 2 )
as t3;
+--enable_view_protocol
+
# End of 4.1 tests
#
diff --git a/mysql-test/main/func_debug.test b/mysql-test/main/func_debug.test
index 9ae24035e20..1fbc652bb48 100644
--- a/mysql-test/main/func_debug.test
+++ b/mysql-test/main/func_debug.test
@@ -24,11 +24,16 @@ SELECT 'a' IN ('a','b',NULL);
SELECT 'a' NOT IN ('a','b');
SELECT 'a' NOT IN ('a','b',NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
+
SELECT TIMESTAMP'2001-01-01 10:20:30' IN ('2001-01-01 10:20:30','2001-02-02 10:20:30');
SELECT TIMESTAMP'2001-01-01 10:20:30' IN ('2001-01-01 10:20:30','2001-02-02 10:20:30',NULL);
SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN ('2001-01-01 10:20:30','2001-02-02 10:20:30');
SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN ('2001-01-01 10:20:30','2001-02-02 10:20:30',NULL);
+--enable_view_protocol
+
SELECT TIME'10:20:30' IN ('10:20:30','10:20:30');
SELECT TIME'10:20:30' IN ('10:20:30','10:20:30',NULL);
SELECT TIME'10:20:30' NOT IN ('10:20:30','10:20:30');
@@ -81,6 +86,9 @@ SELECT a NOT IN ('a','b','c') FROM t1;
SELECT a NOT IN ('a','b','c',NULL) FROM t1;
DROP TABLE t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
CREATE TABLE t1 (a DATE);
SELECT a IN ('2001-01-01',DATE'2001-01-02',20010102,20010102.0,20010102e0) FROM t1;
SELECT a IN ('2001-01-01',DATE'2001-01-02',20010102,20010102.0,20010102e0,NULL) FROM t1;
@@ -102,6 +110,8 @@ SELECT a NOT IN ('2001-01-01',TIMESTAMP'2001-01-01 10:20:30',DATE'2001-01-01',TI
SELECT a NOT IN ('2001-01-01',TIMESTAMP'2001-01-01 10:20:30',DATE'2001-01-01',TIME'10:20:30',20010101102030,20010101102030.0,20010101102030e0,NULL) FROM t1;
DROP TABLE t1;
+--enable_view_protocol
+
--echo # Constant predicant, compatible types, no bisect
--echo # Bisect is not used because of non-constant expressions in the list
CREATE TABLE t1 (a INT);
@@ -146,6 +156,9 @@ SELECT TIME'10:20:30' NOT IN (a,'10:20:30') FROM t1;
SELECT TIME'10:20:30' NOT IN (a,'10:20:30',NULL) FROM t1;
DROP TABLE t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
CREATE TABLE t1 (a DATETIME);
SELECT TIMESTAMP'2001-01-01 10:20:30' IN (a,TIMESTAMP'2001-01-01 10:20:30') FROM t1;
SELECT TIMESTAMP'2001-01-01 10:20:30' IN (a,TIMESTAMP'2001-01-01 10:20:30',NULL) FROM t1;
@@ -153,6 +166,7 @@ SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN (a,TIMESTAMP'2001-01-01 10:20:30')
SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN (a,TIMESTAMP'2001-01-01 10:20:30',NULL) FROM t1;
DROP TABLE t1;
+--enable_view_protocol
--echo # Constant predicant, incompatible types, no bisect
SELECT 1 IN (1,2e0);
@@ -175,6 +189,9 @@ SELECT 'a' IN ('a',2,NULL);
SELECT 'a' NOT IN ('a',2);
SELECT 'a' NOT IN ('a',2,NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
+
SELECT TIME'10:20:30' IN (1,TIME'10:20:30');
SELECT TIME'10:20:30' IN (1,TIME'10:20:30',NULL);
SELECT TIME'10:20:30' IN (102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32');
@@ -203,6 +220,8 @@ SELECT a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1;
SELECT a NOT IN (CAST(1 AS DECIMAL),CAST(1 AS SIGNED), CAST(1 AS UNSIGNED)) FROM t1;
SELECT a NOT IN (CAST(1 AS DECIMAL),CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1;
+--enable_view_protocol
+
SELECT a IN (1,1.0) FROM t1;
SELECT a IN (1,1.0,NULL) FROM t1;
SELECT a NOT IN (1,1.0) FROM t1;
@@ -260,6 +279,9 @@ SELECT a NOT IN ('a',1) FROM t1;
SELECT a NOT IN ('a',TIME'10:20:30') FROM t1;
DROP TABLE t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
CREATE TABLE t1 (a TIME);
SELECT a IN (102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32') FROM t1;
SELECT a IN (102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32',NULL) FROM t1;
@@ -271,6 +293,8 @@ SELECT a NOT IN (102030, 102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32')
SELECT a NOT IN (102030, 102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32',NULL) FROM t1;
DROP TABLE t1;
+--enable_view_protocol
+
#
# ROW tests
#
@@ -413,9 +437,13 @@ DROP TABLE t1;
--echo #
--echo # MDEV-11514 IN with a mixture of TIME and DATETIME returns a wrong result
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32');
+--enable_view_protocol
+
PREPARE stmt FROM "SELECT
TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32')";
EXECUTE stmt;
@@ -502,7 +530,10 @@ SELECT * FROM t1 WHERE a BETWEEN 1 AND 1;
SELECT * FROM t1 WHERE a BETWEEN 0 AND 1;
SELECT * FROM t1 WHERE a BETWEEN 0 AND -1;
SELECT * FROM t1 WHERE a BETWEEN -1 AND -1;
+#enable after fix MDEV-29524
+--disable_view_protocol
SELECT * FROM t1 WHERE a BETWEEN -0000000000000001 AND -1;
+--enable_view_protocol
SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551615;
SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551616;
SELECT * FROM t1 WHERE a BETWEEN 1e2 AND 100e0;
diff --git a/mysql-test/main/func_default.test b/mysql-test/main/func_default.test
index d2099d3ef4c..1125ac32e81 100644
--- a/mysql-test/main/func_default.test
+++ b/mysql-test/main/func_default.test
@@ -142,6 +142,9 @@ DROP TABLE t1;
--echo #
--echo # MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
--echo #
+#view protocol generates additional statistics
+--disable_view_protocol
+
create table t1 (a datetime default current_timestamp);
insert into t1 () values (),();
create algorithm=temptable view v1 as select * from t1;
@@ -151,6 +154,8 @@ select default(a) = now() from v2;
drop view v1, v2;
drop table t1;
+--enable_view_protocol
+
create table t1 (v1 timestamp) select 'x';
show create table t1;
select default(v1) from (select v1 from t1) dt;
diff --git a/mysql-test/main/func_digest.test b/mysql-test/main/func_digest.test
index e7d73b4f368..afc3941e1b3 100644
--- a/mysql-test/main/func_digest.test
+++ b/mysql-test/main/func_digest.test
@@ -458,6 +458,8 @@ SELECT SHA2( x'f4259473bfd39877bfe9597353d7ce8dd520c66d1fc7884e4e03b655c63a77217
SELECT SHA2( x'd60da691585b7c0c3714905411ae8e3515e8490dbbaf07d1b2431f501a96c7bcf4f52766d7e9b2c9e460b5cafc08303e30fce6ad78a2b055a8d31672a13d20bdc4066a33adb277171d47473a37af2c7af05dd989c134bcf09ea48e532c1628f62f8a9880417e74ffca126e2d2c6b29f23e554b29fc2cd4a77dfcae7925e784', 512 ) = 'ec83376ff6f633ee2d898d87a6a91efb0788bce188fac7d3c4c35f81ba6015640dbfad1f8584557ec210478a0cb566f1490643ce602aa5abfab63d46f7f1d4ee' as NIST_SHA512_test_vector;
SELECT SHA2( x'b7d5d5f8955d1ad349b9e618c7987814f6dc7bdc6c4ee59a79902026685468d601cc74965361583bb0a8aa14f892e3c21be3094ad9e58b69cc5d6d28a9bea4afc39dc45ed065d81af04c91e5eb85a4b2bab76d774aafd8837c52811270d51a1f03300e7996cf6319128be5b328da818bde42ef8a471494919156a60d460191cc', 512 ) = '6e7fb797dfca7577432c0b339fe9003b36942a549b112d32016b257c9a866e4385e01d4e757d4378b8e61f5a8a29aa73f2daafdaab23dfe4e0b93df21374e594' as NIST_SHA512_test_vector;
+#view protocol generates additional warnings
+--disable_view_protocol
## Test some unusual parameters items.
## First, the ones that must return NULL.
SELECT SHA2( x'ff', 1 );
@@ -467,6 +469,7 @@ SELECT SHA2( x'ff', 511 );
SELECT SHA2( x'ff', least(123, 42) );
SELECT SHA2( x'ff', 10000000000000 );
SELECT SHA2( SHA2( NULL, 224), 224 );
+--enable_view_protocol
## Second, things that mustn't return NULL;
SELECT SHA2( SHA2( x'ff', 224), 224 ) is not NULL;
SELECT SHA2( SHA2( x'ff', NULL), 224 ) is not NULL;
@@ -485,6 +488,8 @@ SELECT LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512;
--echo #
--echo # Bug#54661 sha2() returns BINARY result
--echo #
+
+--disable_view_protocol
--enable_metadata
SET NAMES binary;
SELECT sha2('1',224);
@@ -493,6 +498,7 @@ SELECT sha2('1',224);
SET NAMES latin1;
SELECT sha2('1',224);
--disable_metadata
+--disable_view_protocol
--echo #
--echo # Start of 10.1 tests
diff --git a/mysql-test/main/func_encrypt_ucs2.test b/mysql-test/main/func_encrypt_ucs2.test
index 1242c3b9e6a..6c1306955aa 100644
--- a/mysql-test/main/func_encrypt_ucs2.test
+++ b/mysql-test/main/func_encrypt_ucs2.test
@@ -8,5 +8,8 @@
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
+#enable after fix MDEV-28643, MDEV-27871
+--disable_view_protocol
SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)));
SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED);
+--enable_view_protocol
diff --git a/mysql-test/main/func_extract.test b/mysql-test/main/func_extract.test
index edc99b9c00c..97920f1872f 100644
--- a/mysql-test/main/func_extract.test
+++ b/mysql-test/main/func_extract.test
@@ -62,6 +62,8 @@ SELECT a, b, EXTRACT(SECOND FROM a), EXTRACT(SECOND FROM b) FROM t1 WHERE NOT (E
SELECT a, b, EXTRACT(MICROSECOND FROM a), EXTRACT(MICROSECOND FROM b) FROM t1 WHERE NOT (EXTRACT(MICROSECOND FROM a)<=>EXTRACT(MICROSECOND FROM b));
--enable_warnings
+#enable after fix MDEV-29525
+--disable_view_protocol
--echo # Detailed results
SELECT
a,
@@ -86,6 +88,7 @@ SELECT
EXTRACT(MICROSECOND FROM b)
FROM t1;
DROP TABLE t1;
+--enable_view_protocol
--echo # Special case: DAY + TIME
CREATE TABLE t1 (a VARCHAR(64));
@@ -103,6 +106,8 @@ SELECT a,
FROM t1;
DROP TABLE t1;
+#enable after fix MDEV-29525
+--disable_view_protocol
--echo # Bad values
CREATE TABLE t1 (a VARCHAR(64));
INSERT INTO t1 VALUES ('');
@@ -119,7 +124,7 @@ SELECT a,
EXTRACT(MICROSECOND FROM a)
FROM t1;
DROP TABLE t1;
-
+--enable_view_protocol
--echo # Backward compatibility
@@ -249,9 +254,12 @@ INSERT INTO t1 VALUES
('01:02:03/'),
('20 10:20:30');
+#enable after fix MDEV-29525
+--disable_view_protocol
SELECT
EXTRACT(DAY FROM a),
EXTRACT(DAY_SECOND FROM a), a,
CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm
FROM t1;
DROP TABLE t1;
+--enable_view_protocol
diff --git a/mysql-test/main/func_gconcat.test b/mysql-test/main/func_gconcat.test
index 3c21aa04ffc..e24dba5d04f 100644
--- a/mysql-test/main/func_gconcat.test
+++ b/mysql-test/main/func_gconcat.test
@@ -1,6 +1,7 @@
#
# simple test of group_concat function
#
+
source include/have_sequence.inc;
create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null);
@@ -403,7 +404,9 @@ drop table t1;
create table t1 (f1 int unsigned, f2 varchar(255));
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
--enable_metadata
+--disable_view_protocol
select f2,group_concat(f1) from t1 group by f2;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -491,7 +494,9 @@ set names latin1;
create table t1 (f1 int unsigned, f2 varchar(255));
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
--enable_metadata
+--disable_view_protocol
select f2,group_concat(f1) from t1 group by f2;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -931,7 +936,10 @@ SELECT * FROM (SELECT a,GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLU
SELECT * FROM v1;
DROP VIEW v1;
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP HAVING GROUP_CONCAT(a ORDER BY a)='10,20,30');
+--enable_view_protocol
CREATE VIEW v1 AS
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP HAVING GROUP_CONCAT(a ORDER BY a)='10,20,30');
SELECT * FROM v1;
diff --git a/mysql-test/main/func_group.test b/mysql-test/main/func_group.test
index 381bdebdc16..7309ca4cdfe 100644
--- a/mysql-test/main/func_group.test
+++ b/mysql-test/main/func_group.test
@@ -587,6 +587,8 @@ DROP TABLE t1;
#
# Bug #16792 query with subselect, join, and group not returning proper values
#
+#enable after fix MDEV-28573
+--disable_view_protocol
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,1),(1,2),(2,3);
@@ -597,6 +599,7 @@ SELECT AVG(2), BIT_AND(2), BIT_OR(2), BIT_XOR(2), COUNT(*), COUNT(12),
COUNT(DISTINCT 12), MIN(2),MAX(2),STD(2), VARIANCE(2),SUM(2),
GROUP_CONCAT(2),GROUP_CONCAT(DISTINCT 2);
DROP TABLE t1;
+--enable_view_protocol
# End of 4.1 tests
@@ -628,11 +631,13 @@ drop table t1, t2, t3;
#
# BUG#3190, WL#1639: Standard Deviation STDDEV - 2 different calculations
#
-
+#enable after fix MDEV-28573
+--disable_view_protocol
CREATE TABLE t1 (id int(11),value1 float(10,2));
INSERT INTO t1 VALUES (1,0.00),(1,1.00), (1,2.00), (2,10.00), (2,11.00), (2,12.00), (2,13.00);
select id, stddev_pop(value1), var_pop(value1), stddev_samp(value1), var_samp(value1) from t1 group by id;
DROP TABLE t1;
+--enable_view_protocol
#
# BUG#8464 decimal AVG returns incorrect result
@@ -969,6 +974,8 @@ INSERT INTO D VALUES
(83,45,4,repeat(' X', 42)),
(105,53,12,NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT
(SELECT COUNT( int_nokey )
FROM derived1 AS X
@@ -982,6 +989,7 @@ GROUP BY int_nokey LIMIT 1;
DROP TABLE derived1;
DROP TABLE D;
+--enable_view_protocol
#
# Bug #39656: Behaviour different for agg functions with & without where -
diff --git a/mysql-test/main/func_group_innodb.test b/mysql-test/main/func_group_innodb.test
index 748c64a43c6..b1f9a28b190 100644
--- a/mysql-test/main/func_group_innodb.test
+++ b/mysql-test/main/func_group_innodb.test
@@ -15,7 +15,10 @@ set global innodb_stats_persistent_sample_pages=100;
create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
--enable_warnings
insert into t1 values (1, 3);
+#enable after fix MDEV-27871
+--disable_view_protocol
select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ;
+--enable_view_protocol
select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ;
drop table t1;
diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test
index cf41d92b01f..1b903f78b3f 100644
--- a/mysql-test/main/func_hybrid_type.test
+++ b/mysql-test/main/func_hybrid_type.test
@@ -126,10 +126,12 @@ DROP TABLE t1;
--echo # MDEV-4848 Wrong metadata or column type for LEAST(1.0,'10')
--echo #
--disable_ps_protocol
+--disable_view_protocol
--enable_metadata
SELECT LEAST(1.0,'10');
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
CREATE TABLE t1 AS SELECT LEAST(1.0,'10');
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -148,6 +150,7 @@ DROP TABLE t1;
--echo #
SET timestamp=UNIX_TIMESTAMP('2010-01-01 01:02:03');
--disable_ps_protocol
+--disable_view_protocol
--enable_metadata
# Expect DATETIME type (12) in metadata
SELECT GREATEST(CURRENT_TIME, CURRENT_DATE), COALESCE(CURRENT_TIME, CURRENT_DATE);
@@ -160,6 +163,7 @@ SELECT COALESCE(a,a) FROM t1;
DROP TABLE t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
CREATE TABLE t1 (a TIMESTAMP, b DATETIME);
CREATE TABLE t2 AS SELECT LEAST(a,a),LEAST(b,b),LEAST(a,b) FROM t1;
SHOW CREATE TABLE t2;
@@ -179,6 +183,7 @@ SELECT
MAX(COALESCE(c4)) AS c4
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -189,6 +194,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -199,6 +205,7 @@ SELECT
MAX(COALESCE(c2)) AS c2
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -207,6 +214,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -217,6 +225,7 @@ SELECT
MAX(COALESCE(c2)) AS c2
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -225,6 +234,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -236,6 +246,7 @@ SELECT
MAX(COALESCE(c3)) AS c3
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -245,6 +256,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -256,6 +268,7 @@ SELECT
MAX(COALESCE(c3)) AS c3
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -265,6 +278,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -274,6 +288,7 @@ SELECT
MAX(COALESCE(c1)) AS c1
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -281,6 +296,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -290,6 +306,7 @@ SELECT
MAX(COALESCE(c1)) AS c1
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -297,6 +314,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -313,6 +331,7 @@ SELECT
@c4:=c4 AS c4
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -323,6 +342,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -333,6 +353,7 @@ SELECT
@c2:=c2 AS c2
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -341,6 +362,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -351,6 +373,7 @@ SELECT
@c2:=c2 AS c2
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -359,6 +382,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -370,6 +394,7 @@ SELECT
@c:=c3 AS c3
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -379,6 +404,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -390,6 +416,7 @@ SELECT
@c:=c3 AS c3
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -399,6 +426,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -408,6 +436,7 @@ SELECT
@c:=c1 AS c1
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -415,6 +444,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -424,6 +454,7 @@ SELECT
@c:=c1 AS c1
FROM t1;
SHOW CREATE TABLE t2;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -431,6 +462,7 @@ SELECT
FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t2;
DROP TABLE t1;
@@ -438,15 +470,20 @@ DROP TABLE t1;
--echo #
--echo # MDEV-9653 Assertion `length || !scale' failed in uint my_decimal_length_to_precision(uint, uint, bool)
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CASE 0 WHEN 1 THEN (CASE 2 WHEN 3 THEN NULL END) WHEN 4 THEN 5 END;
+--enable_view_protocol
SELECT CASE 0 WHEN 1 THEN (COALESCE(NULL)) WHEN 4 THEN 5 END;
SELECT CASE WHEN TRUE THEN COALESCE(NULL) ELSE 4 END;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT COALESCE(COALESCE(NULL), 1.1) AS c0, IF(0, COALESCE(NULL), 1.1) AS c1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
--echo #
@@ -653,6 +690,7 @@ SET sql_mode=DEFAULT;
SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -666,6 +704,7 @@ SELECT
LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
CREATE TABLE t1 AS SELECT
@@ -730,6 +769,7 @@ DROP TABLE t1;
SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT
@@ -743,6 +783,7 @@ SELECT
LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
CREATE TABLE t1 AS SELECT
@@ -836,11 +877,13 @@ SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c;
--echo #
CREATE TABLE t1 (a INT UNSIGNED, b TIMESTAMP);
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT COALESCE(a,b) FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t1;
--echo #
diff --git a/mysql-test/main/func_if.test b/mysql-test/main/func_if.test
index dc6749da26f..d18bdc3070e 100644
--- a/mysql-test/main/func_if.test
+++ b/mysql-test/main/func_if.test
@@ -119,6 +119,8 @@ select if(0, 18446744073709551610, 18446744073709551610);
CREATE TABLE t1(a DECIMAL(10,3));
+#enable after fix MDEV-27871
+--disable_view_protocol
# check : should be fast. more than few secs means failure.
SELECT t1.a,
IF((ROUND(t1.a,2)=1), 2,
@@ -152,7 +154,7 @@ SELECT t1.a,
IF((ROUND(t1.a,2)=1), 2,
IF((ROUND(t1.a,2)=1), 2,0)))))))))))))))))))))))))))))) + 1
FROM t1;
-
+--enable_view_protocol
DROP TABLE t1;
#
diff --git a/mysql-test/main/func_in.test b/mysql-test/main/func_in.test
index fb6f2036f20..2581a07ac09 100644
--- a/mysql-test/main/func_in.test
+++ b/mysql-test/main/func_in.test
@@ -354,6 +354,8 @@ SELECT HEX(a) FROM t2 WHERE a IN
SELECT HEX(a) FROM t2 WHERE a IN
(CAST(0x7ffffffffffffffe AS UNSIGNED),
CAST(0x7fffffffffffffff AS UNSIGNED));
+#view protocol generates additional warning
+--disable_view_protocol
SELECT HEX(a) FROM t2 WHERE a IN
(0x7ffffffffffffffe,
0x7fffffffffffffff,
@@ -368,6 +370,8 @@ CREATE TABLE t4 (a DATE);
INSERT INTO t4 VALUES ('1972-02-06'), ('1972-07-29');
SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29');
+--enable_view_protocol
+
DROP TABLE t1,t2,t3,t4;
#
@@ -402,8 +406,11 @@ create table t2(f2 int, index t2f2(f2));
insert into t2 values(0),(1),(2);
select f2 from t2 where f2 in ('a',2);
explain select f2 from t2 where f2 in ('a',2);
+#view protocol generates additional warning
+--disable_view_protocol
select f2 from t2 where f2 in ('a','b');
explain select f2 from t2 where f2 in ('a','b');
+--enable_view_protocol
select f2 from t2 where f2 in (1,'b');
explain select f2 from t2 where f2 in (1,'b');
drop table t1, t2;
@@ -658,12 +665,14 @@ DROP TABLE t1;
--echo #
--echo # MDEV-11514 IN with a mixture of TIME and DATETIME returns a wrong result
--echo #
-
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32');
PREPARE stmt FROM "SELECT TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32')";
EXECUTE stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
+--enable_view_protocol
--echo #
--echo # MDEV-11497 Wrong result for (int_expr IN (mixture of signed and unsigned expressions))
@@ -686,11 +695,13 @@ DROP TABLE t1;
# when using Arg_comparator (e.g. in binary comparison operators), and
# when not using it (e.g. in IN predicate).
+#view protocol generates additional warning
+--disable_view_protocol
SELECT
TIME'00:00:00'='' AS c1_true,
TIME'00:00:00' IN ('', TIME'10:20:30') AS c2_true,
TIME'00:00:00' NOT IN ('', TIME'10:20:30') AS c3_false;
-
+--enable_view_protocol
--echo #
--echo # End of 10.3 tests
@@ -714,3 +725,4 @@ SELECT ('0x',1) IN ((0,1),(1,1));
--echo #
--echo # End of 10.4 tests
--echo #
+
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 83f4bf9d1ad..ff8df5d7152 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -9,19 +9,29 @@ select json_value('{"key1":123}', '$.key2');
select json_value('{"key1":123}', '$.key1');
select json_value('{"key1":[1,2,3]}', '$.key1');
select json_value('{"key1": [1,2,3], "key1":123}', '$.key1');
+
+#enable after fix MDEV-27871
+--disable_view_protocol
select JSON_VALUE('{ "x": [0,1], "y": "[0,1]", "z": "Mon\\\"t\\\"y" }','$.z');
+--enable_view_protocol
select json_query('{"key1":{"a":1, "b":[1,2]}}', '$.key2');
select json_query('{"key1":{"a":1, "b":[1,2]}}', '$.key1');
select json_query('{"key1": 1}', '$.key1');
select json_query('{"key1":123, "key1": [1,2,3]}', '$.key1');
+#enable after fix MDEV-27871
+--disable_view_protocol
select json_query('{"key1":123, "key1": [1,2,3]}', concat('$', repeat('.k', 1000)));
+--enable_view_protocol
select json_array();
select json_array(1);
+#enable after fix MDEV-28649
+--disable_view_protocol
select json_array(1, "text", false, null);
select json_array_append('["a", "b"]', '$', FALSE);
+--enable_view_protocol
select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2);
select json_array_append('["a", ["b", "c"], "d"]', '$[0]', 2);
@@ -29,9 +39,15 @@ select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x');
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x');
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x');
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x');
+#enable after fix MDEV-27871
+--disable_view_protocol
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1].b[0]', 'x');
+--enable_view_protocol
select json_array_insert('true', '$', 1);
+#enable after fix MDEV-27871
+--disable_view_protocol
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[2][1]', 'y');
+--enable_view_protocol
select json_contains('{"k1":123, "k2":345}', '123', '$.k1');
select json_contains('"you"', '"you"');
@@ -56,7 +72,10 @@ select json_contains('{"a":1}', '{}');
select json_contains('[1, {"a":1}]', '{}');
select json_contains('[1, {"a":1}]', '{"a":1}');
select json_contains('[{"abc":"def", "def":"abc"}]', '["foo","bar"]');
+#enable after fix MDEV-27871
+--disable_view_protocol
select json_contains('[{"abc":"def", "def":"abc"}, "bar"]', '["bar", {}]');
+--disable_view_protocol
select json_contains('[{"a":"b"},{"c":"d"}]','{"c":"d"}');
select json_contains_path('{"key1":1, "key2":[2,3]}', "oNE", "$.key2[1]");
diff --git a/mysql-test/main/func_like.test b/mysql-test/main/func_like.test
index ef13d46c268..7339743afe4 100644
--- a/mysql-test/main/func_like.test
+++ b/mysql-test/main/func_like.test
@@ -57,6 +57,7 @@ drop table t1;
# Test like with non-default character set
#
+--disable_service_connection
SET NAMES koi8r;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET koi8r);
@@ -71,6 +72,7 @@ SELECT * FROM t1 WHERE a LIKE '%Æù×%';
SELECT * FROM t1 WHERE a LIKE 'Æù×Á%';
DROP TABLE t1;
+--enable_service_connection
# Bug #2547 Strange "like" behaviour in tables with default charset=cp1250
# Test like with non-default character set using TurboBM
@@ -99,6 +101,7 @@ select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin;
#
# Check 8bit escape character
#
+--disable_service_connection
set names koi8r;
select 'andre%' like 'andreÊ%' escape 'Ê';
@@ -112,6 +115,7 @@ select 'andre%' like 'andreÊ%' escape 'Ê';
#
select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
+--enable_service_connection
--echo End of 4.1 tests
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index 572e0fd0f6b..c865aa88660 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -206,9 +206,15 @@ select floor(cast(-2 as unsigned)), floor(18446744073709551614), floor(-2);
select format(cast(-2 as unsigned), 2), format(18446744073709551614, 2), format(-2, 2);
select sqrt(cast(-2 as unsigned)), sqrt(18446744073709551614), sqrt(-2);
select round(cast(-2 as unsigned), 1), round(18446744073709551614, 1), round(-2, 1);
+#view protocol generates additional warning
+--disable_view_protocol
select round(4, cast(-2 as unsigned)), round(4, 18446744073709551614), round(4, -2);
+--enable_view_protocol
select truncate(cast(-2 as unsigned), 1), truncate(18446744073709551614, 1), truncate(-2, 1);
+#view protocol generates additional warning
+--disable_view_protocol
select truncate(4, cast(-2 as unsigned)), truncate(4, 18446744073709551614), truncate(4, -2);
+--enable_view_protocol
select round(10000000000000000000, -19), truncate(10000000000000000000, -19);
select round(1e0, -309), truncate(1e0, -309);
select round(1e1,308), truncate(1e1, 308);
@@ -516,7 +522,10 @@ SELECT @a / 0.5;
SELECT COT(1/0);
SELECT -1 + 9223372036854775808;
SELECT 2 DIV -2;
+#view protocol generates additional warning
+--disable_view_protocol
SELECT -(1 DIV 0);
+--enable_view_protocol
# Crashed the server with SIGFPE before the bugfix
SELECT -9223372036854775808 MOD -1;
@@ -556,8 +565,11 @@ select (1.175494351E-37 div 1.7976931348623157E+308);
select round(999999999, -9);
select round(999999999.0, -9);
+#enable after fix MDEV-29526
+--disable_view_protocol
select round(999999999999999999, -18);
select round(999999999999999999.0, -18);
+--enable_view_protocol
--echo #
--echo # Bug#12537160 ASSERTION FAILED:
@@ -671,7 +683,10 @@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table;
CREATE TABLE t1 ( pk int NOT NULL, i1 int NOT NULL, d1 date NOT NULL, t1 time);
INSERT INTO t1 VALUES (7,9,'2007-08-15','03:55:02'),(8,7,'1993-06-05','04:17:51'),(9,7,'2034-07-01','17:31:12'),(10,0,'1998-08-24','08:09:27');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT DISTINCT STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1)))) FROM t1;
+--enable_view_protocol
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(128));
@@ -791,7 +806,10 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
--echo # CRC32 tests
--echo #
+#enable after fix MDEV-28535
+--disable_view_protocol
select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678'), CRC32(REPEAT('ABCDEfghij', 20)), CRC32(REPEAT('0123456789', 200));
+--enable_view_protocol
--echo #
--echo # Start of 10.3 tests
@@ -844,7 +862,10 @@ SET sql_mode=DEFAULT;
--echo # Bug#26495791 - EXPAND TEST SUITE TO INCLUDE CRC32 TESTS
--echo #
+#enable after fix MDEV-28535
+--disable_view_protocol
SELECT CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql');
+--enable_view_protocol
SELECT CRC32('01234567'), CRC32('012345678');
SELECT CRC32('~!@$%^*'), CRC32('-0.0001');
SELECT CRC32(99999999999999999999999999999999);
diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test
index 56e7a996f94..c69832375e7 100644
--- a/mysql-test/main/func_misc.test
+++ b/mysql-test/main/func_misc.test
@@ -158,7 +158,10 @@ select benchmark(100, (select avg(func_26093_a(a)) from table_26093));
select @invoked;
set @invoked := 0;
+#enable after fix MDEV-27871
+--disable_view_protocol
select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093));
+--enable_view_protocol
# Returns 1000, due to rand() preventing caching.
select @invoked;
@@ -267,10 +270,12 @@ set @@session.time_zone=@save_tz;
#
# Bug#42014: Crash, name_const with collate
#
+--disable_view_protocol
CREATE TABLE t1 (a DATE);
SELECT * FROM t1 WHERE a = NAME_CONST('reportDate',
_binary'2009-01-09' COLLATE 'binary');
DROP TABLE t1;
+--enable_view_protocol
#
# Bug#35515: Aliases of variables in binary log are ignored with NAME_CONST
@@ -631,6 +636,8 @@ DROP TABLE t1;
--echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
--echo #
+--disable_service_connection
+
--echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired
--echo # Note: IS_USED_LOCK returns NULL if the lock is unused
select is_used_lock('test');
@@ -791,6 +798,7 @@ select is_free_lock(repeat('a', 193));
--error ER_TOO_LONG_IDENT
select release_lock(repeat('a', 193));
+--enable_service_connection
--echo
--echo # --
@@ -941,8 +949,11 @@ SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5::7:8'));
SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5:6::8'));
SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5:6:7::'));
SELECT INET6_NTOA(INET6_ATON('0000:0000::0000:0001'));
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT INET6_NTOA(INET6_ATON('1234:5678:9abc:def0:4321:8765:cba9:0fed'));
SELECT INET6_NTOA(INET6_ATON('0000:0000:0000:0000:0000:0000:0000:0001'));
+--enable_view_protocol
SELECT INET6_NTOA(INET6_ATON('::C0A8:0102'));
SELECT INET6_NTOA(INET6_ATON('::c0a8:0102'));
SELECT INET6_NTOA(INET6_ATON('::192.168.1.2'));
@@ -1113,12 +1124,14 @@ select release_lock('test');
--echo #
--echo # MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
--echo #
+--disable_service_connection
SET NAMES utf8;
SELECT COERCIBILITY(NAME_CONST('name','test'));
SELECT COERCIBILITY(NAME_CONST('name',TIME'00:00:00'));
SELECT COERCIBILITY(NAME_CONST('name',15));
SELECT CONCAT(NAME_CONST('name',15),'오');
SET NAMES latin1;
+--enable_service_connection
--echo #
--echo # MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable
@@ -1233,9 +1246,11 @@ SELECT RELEASE_LOCK('foo');
--enable_metadata
--disable_ps_protocol
+--disable_view_protocol
SELECT INET_ATON("255.255.255.255.255.255.255.255");
+--enable_view_protocol
--enable_ps_protocol
--disable_metadata
@@ -1245,7 +1260,9 @@ SELECT INET_ATON("255.255.255.255.255.255.255.255");
--enable_metadata
--disable_ps_protocol
+--disable_view_protocol
SELECT 18446744073709551615 AS c1, name_const('a',18446744073709551615) AS c2;
+--enable_view_protocol
--enable_ps_protocol
--disable_metadata
@@ -1287,6 +1304,7 @@ DROP TABLE t1;
--echo #
--echo # MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
--echo #
+--disable_view_protocol
--echo # Test function without any locks
SELECT RELEASE_ALL_LOCKS();
@@ -1340,3 +1358,5 @@ FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHE
SELECT RELEASE_ALL_LOCKS();
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+
+--enable_view_protocol
diff --git a/mysql-test/main/func_regexp_pcre.test b/mysql-test/main/func_regexp_pcre.test
index 3851caf8917..e6e356f4a8c 100644
--- a/mysql-test/main/func_regexp_pcre.test
+++ b/mysql-test/main/func_regexp_pcre.test
@@ -1,4 +1,4 @@
-
+--disable_service_connection
SET NAMES utf8;
--echo #
@@ -325,11 +325,13 @@ SELECT REGEXP_INSTR('ваÑÑ','в');
SELECT REGEXP_INSTR('ваÑÑ','а');
SELECT REGEXP_INSTR('ваÑÑ','Ñ');
SELECT REGEXP_INSTR('ваÑÑ','Ñ');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('в' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('а' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('Ñ' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('Ñ' USING koi8r));
-
+--enable_view_protocol
--echo #
--echo # Checking REGEXP_SUBSTR
@@ -349,9 +351,10 @@ CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0;
SHOW CREATE TABLE t1;
DROP TABLE t1;
-
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT REGEXP_SUBSTR('See https://mariadb.org/en/foundation/ for details', 'https?://[^/]*');
-
+--enable_view_protocol
--echo #
--echo # MDEV-6027 RLIKE: "." no longer matching new line
@@ -368,6 +371,8 @@ SELECT 'a\nb' RLIKE 'a.b';
SELECT 'a\nb' RLIKE '(?-s)a.b';
SET default_regex_flags=DEFAULT;
+#enable after fix MDEV-27871
+--disable_view_protocol
# note that old pcre2 reports a different offset
--replace_result 29 30
--error ER_REGEXP_ERROR
@@ -375,6 +380,7 @@ SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=
SET default_regex_flags='DUPNAMES';
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
SELECT REGEXP_SUBSTR('Tuesday Tue','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
+--enable_view_protocol
SET default_regex_flags=DEFAULT;
SELECT 'AB' RLIKE 'A B';
@@ -387,8 +393,11 @@ SET default_regex_flags=DEFAULT;
--error ER_REGEXP_ERROR
SELECT 'Aq' RLIKE 'A\\q';
+#double warning for view protocol
+--disable_view_protocol
SET default_regex_flags='EXTRA';
SELECT 'A' RLIKE 'B';
+--enable_view_protocol
SET default_regex_flags=DEFAULT;
@@ -407,7 +416,10 @@ SET default_regex_flags=DEFAULT;
--echo #
--echo # MDEV-6965 non-captured group \2 in regexp_replace
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT REGEXP_REPLACE('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that');
+--enable_view_protocol
--echo #
--echo # MDEV-8102 REGEXP function fails to match hex values when expression is stored as a variable
@@ -442,6 +454,9 @@ SELECT CAST(0xE001 AS BINARY) REGEXP @regCheck;
SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,Golf,Hotel,India,Juliet,Kilo,Lima,Mike,StrataL3,November,Oscar,StrataL2,Sand,P3,P4SwitchTest,Arsys,Poppa,ExtensionMgr,Arp,Quebec,Romeo,StrataApiV2,PtReyes,Sierra,SandAcl,Arrow,Artools,BridgeTest,Tango,SandT,PAlaska,Namespace,Agent,Qos,PatchPanel,ProjectReport,Ark,Gimp,Agent,SliceAgent,Arnet,Bgp,Ale,Tommy,Central,AsicPktTestLib,Hsc,SandL3,Abuild,Pca9555,Standby,ControllerDut,CalSys,SandLib,Sb820,PointV2,BfnLib,Evpn,BfnSdk,Sflow,ManagementActive,AutoTest,GatedTest,Bgp,Sand,xinetd,BfnAgentLib,bf-utils,Hello,BfnState,Eos,Artest,Qos,Scd,ThermoMgr,Uniform,EosUtils,Eb,FanController,Central,BfnL3,BfnL2,tcp_wrappers,Victor,Environment,Route,Failover,Whiskey,Xray,Gimp,BfnFixed,Strata,SoCal,XApi,Msrp,XpProfile,tcpdump,PatchPanel,ArosTest,FhTest,Arbus,XpAcl,MacConc,XpApi,telnet,QosTest,Alpha2,BfnVlan,Stp,VxlanControllerTest,MplsAgent,Bravo2,Lanz,BfnMbb,Intf,XCtrl,Unicast,SandTunnel,L3Unicast,Ipsec,MplsTest,Rsvp,EthIntf,StageMgr,Sol,MplsUtils,Nat,Ira,P4NamespaceDut,Counters,Charlie2,Aqlc,Mlag,Power,OpenFlow,Lag,RestApi,BfdTest,strongs,Sfa,CEosUtils,Adt746,MaintenanceMode,MlagDut,EosImage,IpEth,MultiProtocol,Launcher,Max3179,Snmp,Acl,IpEthTest,PhyEee,bf-syslibs,tacc,XpL2,p4-ar-switch,p4-bf-switch,LdpTest,BfnPhy,Mirroring,Phy6,Ptp' REGEXP '^((?!\b(Strata|StrataApi|StrataApiV2)\b).)*$');
--enable_result_log
--enable_warnings
+#enable after fix MDEV-27871
+--disable_view_protocol
+--enable_view_protocol
#
# MDEV-12942 REGEXP_INSTR returns 1 when using brackets
@@ -454,3 +469,4 @@ SELECT REGEXP_INSTR('a_kollision', 'o([lm])\\1');
# MDEV-12939 A query crashes MariaDB in Item_func_regex::cleanup
#
SELECT a FROM (SELECT "aa" a) t WHERE a REGEXP '[0-9]';
+--enable_service_connection
diff --git a/mysql-test/main/func_rollback.test b/mysql-test/main/func_rollback.test
index 87930909f91..e8af4ef2eff 100644
--- a/mysql-test/main/func_rollback.test
+++ b/mysql-test/main/func_rollback.test
@@ -38,6 +38,7 @@
# Created:
# 2008-04-09 mleich
#
+-- source include/no_view_protocol.inc
let $fixed_bug_35877 = 0;
diff --git a/mysql-test/main/func_sapdb.test b/mysql-test/main/func_sapdb.test
index 51bdebbec6d..7ded1cece73 100644
--- a/mysql-test/main/func_sapdb.test
+++ b/mysql-test/main/func_sapdb.test
@@ -13,6 +13,8 @@ select extract(SECOND_MICROSECOND FROM "1999-01-02 10:11:12.000123");
select extract(MICROSECOND FROM "1999-01-02 10:11:12.000123");
select date_format("1997-12-31 23:59:59.000002", "%f");
+#enable after fix MDEV-27871
+--disable_view_protocol
select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000 99:99:99.999999" DAY_MICROSECOND);
select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000:99:99.999999" HOUR_MICROSECOND);
select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000:99.999999" MINUTE_MICROSECOND);
@@ -24,6 +26,7 @@ select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1:1:1.000002" HOUR_MICROS
select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1:1.000002" MINUTE_MICROSECOND);
select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1.000002" SECOND_MICROSECOND);
select date_sub("1998-01-01 00:00:00.000001",INTERVAL "000002" MICROSECOND);
+--enable_view_protocol
#Date functions
select adddate("1997-12-31 23:59:59.000001", 10);
@@ -53,16 +56,22 @@ select makedate(100,1);
select addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002");
select subtime("1997-12-31 23:59:59.000001", "1 1:1:1.000002");
+#enable after fix MDEV-27871
+--disable_view_protocol
select addtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999");
select subtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999");
+--enable_view_protocol
select subtime("01:00:00.999999", "02:00:00.999998");
select subtime("02:01:01.999999", "01:01:01.999999");
# PS doesn't support fractional seconds
--disable_ps_protocol
+#enable after fix MDEV-27871
+--disable_view_protocol
select timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002");
select timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002");
select timediff("1997-12-30 23:59:59.000001","1997-12-31 23:59:59.000002");
+--enable_view_protocol
select timediff("1997-12-31 23:59:59.000001","23:59:59.000001");
select timediff("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001");
select timediff("2005-01-11 15:48:49.999999", "2005-01-11 15:48:50");
@@ -143,9 +152,12 @@ select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f");
#
# calculations involving negative time values ignored sign
+#enable after fix MDEV-27871
+--disable_view_protocol
select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10'),time('00:00:00');
select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00');
select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
+--enable_view_protocol
# show that conversion to DECIMAL no longer drops sign
SELECT CAST(time('-73:42:12') AS DECIMAL);
diff --git a/mysql-test/main/func_set.test b/mysql-test/main/func_set.test
index 3509e225a34..e34ec2ad735 100644
--- a/mysql-test/main/func_set.test
+++ b/mysql-test/main/func_set.test
@@ -63,6 +63,8 @@ SELECT INTERVAL(0.0, NULL);
SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL));
SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL));
SELECT INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL));
@@ -70,6 +72,7 @@ SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL));
+--enable_view_protocol
--echo End of 5.0 tests
@@ -105,10 +108,13 @@ DROP TABLE t1, t2;
--echo #
--echo # MDEV-4512 Valgrind warnings in my_long10_to_str_8bit on INTERVAL and DATE_ADD with incorrect types
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
CREATE TABLE t1 (pk INT PRIMARY KEY);
INSERT INTO t1 VALUES (10),(11);
SELECT INTERVAL( 9, 1, DATE_ADD( pk, INTERVAL pk MINUTE_SECOND ), 9, 8, 3, 5, 2, 1 ) FROM t1;
DROP TABLE t1;
+--enable_view_protocol
--echo #
--echo # End of 5.3 tests
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index bbdcead280f..b8bb8a54090 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -32,10 +32,13 @@ select position(binary 'll' in 'hello'),position('a' in binary 'hello');
#
select left('hello',null), right('hello',null);
select left('hello',2),right('hello',2),substring('hello',2,2),mid('hello',1,5) ;
+#enable after fix MDEV-27871
+--disable_view_protocol
select concat('',left(right(concat('what ',concat('is ','happening')),9),4),'',substring('monty',5,1)) ;
select substring_index('www.tcx.se','.',-2),substring_index('www.tcx.se','.',1);
select substring_index('www.tcx.se','tcx',1),substring_index('www.tcx.se','tcx',-1);
select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1);
+--enable_view_protocol
select substring_index('aaaaaaaaa1','a',1);
select substring_index('aaaaaaaaa1','aa',1);
select substring_index('aaaaaaaaa1','aa',2);
@@ -77,16 +80,21 @@ select substring_index('the king of the the hill','the',2);
select substring_index('the king of the the hill','the',3);
select concat(':',ltrim(' left '),':',rtrim(' right '),':');
+#enable after fix MDEV-27871
+--disable_view_protocol
select concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':');
select concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':');
select concat(':',trim(' m '),':',trim(BOTH FROM ' y '),':',trim('*' FROM '*s*'),':');
select concat(':',trim(BOTH 'ab' FROM 'ababmyabab'),':',trim(BOTH '*' FROM '***sql'),':');
select concat(':',trim(LEADING '.*' FROM '.*my'),':',trim(TRAILING '.*' FROM 'sql.*.*'),':');
select TRIM("foo" FROM "foo"), TRIM("foo" FROM "foook"), TRIM("foo" FROM "okfoo");
+--enable_view_protocol
select concat_ws(', ','monty','was here','again');
select concat_ws(NULL,'a'),concat_ws(',',NULL,'');
select concat_ws(',','',NULL,'a');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),repeat('d',100)), '"');
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
@@ -96,6 +104,7 @@ select replace('aaaa','a','bbbb');
--disable_metadata
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') ;
select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb');
+--enable_view_protocol
select 'mood' sounds like 'mud';
select 'Glazgo' sounds like 'Liverpool';
select null sounds like 'null';
@@ -128,15 +137,21 @@ select rpad('abcd',7),lpad('abcd',7);
select LEAST(NULL,'HARRY','HARRIOT',NULL,'HAROLD'),GREATEST(NULL,'HARRY','HARRIOT',NULL,'HAROLD');
select least(1,2,3) | greatest(16,32,8), least(5,4)*1,greatest(-1.0,1.0)*1,least(3,2,1)*1.0,greatest(1,1.1,1.0),least("10",9),greatest("A","B","0");
+#enable after fix MDEV-27871
+--disable_view_protocol
select decode(encode(repeat("a",100000),"monty"),"monty")=repeat("a",100000);
+--enable_view_protocol
select decode(encode("abcdef","monty"),"monty")="abcdef";
select quote('\'\"\\test');
select quote(concat('abc\'', '\\cba'));
select quote(1/0), quote('\0\Z');
select length(quote(concat(char(0),"test")));
+#enable after fix MDEV-27871
+--disable_view_protocol
select hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235))));
select unhex(hex("foobar")), hex(unhex("1234567890ABCDEF")), unhex("345678"), unhex(NULL);
+--enable_view_protocol
select hex(unhex("1")), hex(unhex("12")), hex(unhex("123")), hex(unhex("1234")), hex(unhex("12345")), hex(unhex("123456"));
select length(unhex(md5("abrakadabra")));
@@ -144,7 +159,10 @@ select length(unhex(md5("abrakadabra")));
# Bug #6564: QUOTE(NULL
#
+#enable after fix MDEV-28651
+--disable_view_protocol
select concat('a', quote(NULL));
+--enable_view_protocol
#
# Wrong usage of functions
@@ -161,7 +179,10 @@ select length(repeat("a",100000000)),length(repeat("a",1000*64));
select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("sql" in ("mysql"));
select position(("1" in (1,2,3)) in "01");
select length(repeat("a",65500)),length(concat(repeat("a",32000),repeat("a",32000))),length(replace("aaaaa","a",concat(repeat("a",10000)))),length(insert(repeat("a",40000),1,30000,repeat("b",50000)));
+#enable after fix MDEV-28535
+--disable_view_protocol
select length(repeat("a",1000000)),length(concat(repeat("a",32000),repeat("a",32000),repeat("a",32000))),length(replace("aaaaa","a",concat(repeat("a",32000)))),length(insert(repeat("a",48000),1,1000,repeat("a",48000)));
+--enable_view_protocol
#
# Problem med concat
@@ -190,11 +211,14 @@ CREATE TABLE t1 (
submitter int(10) unsigned default NULL
) ENGINE=MyISAM;
+#enable after fix MDEV-27871
+--disable_view_protocol
INSERT INTO t1 VALUES (1,'Link',1,1,1,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','2001-02-28 08:40:16',20010228084016,0,4);
SELECT CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugdesc,created,modified+0,bugstatus,submitter), '"') FROM t1;
SELECT CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugstatus,submitter), '"') FROM t1;
SELECT CONCAT_WS('";"',title,prio,category,program,bugdesc,created,modified+0,bugstatus,submitter) FROM t1;
SELECT bugdesc, REPLACE(bugdesc, 'xxxxxxxxxxxxxxxxxxxx', 'bbbbbbbbbbbbbbbbbbbb') from t1 group by bugdesc;
+--enable_view_protocol
drop table t1;
#
@@ -736,8 +760,10 @@ select hex(29223372036854775809), hex(-29223372036854775809);
create table t1 (i int);
insert into t1 values (1000000000),(1);
--enable_metadata
+--disable_view_protocol
select lpad(i, 7, ' ') as t from t1;
select rpad(i, 7, ' ') as t from t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -887,18 +913,23 @@ select format(NULL, NULL);
select format(pi(), NULL);
select format(NULL, 2);
+#enable after fix MDEV-28585
+--disable_view_protocol
select benchmark(NULL, NULL);
select benchmark(0, NULL);
select benchmark(100, NULL);
select benchmark(NULL, 1+1);
+--enable_view_protocol
#
# Bug #20752: BENCHMARK with many iterations returns too quickly
#
# not a string, but belongs with the above Bug#22684
+#enable after fix MDEV-28585
+--disable_view_protocol
select benchmark(-1, 1);
-
+--enable_view_protocol
#
# Please note:
# 1) The collation of the password is irrelevant, the encryption uses
@@ -964,33 +995,57 @@ select left('hello', 10);
select left('hello', 0);
select left('hello', -1);
select left('hello', -4294967295);
+#enable after fix MDEV-29552
+--disable_view_protocol
select left('hello', 4294967295);
+--enable_view_protocol
select left('hello', -4294967296);
+#enable after fix MDEV-29552
+--disable_view_protocol
select left('hello', 4294967296);
+--enable_view_protocol
select left('hello', -4294967297);
+#enable after fix MDEV-29552
+--disable_view_protocol
select left('hello', 4294967297);
+--enable_view_protocol
+#view protocol generates additional warning
+--disable_view_protocol
select left('hello', -18446744073709551615);
select left('hello', 18446744073709551615);
select left('hello', -18446744073709551616);
select left('hello', 18446744073709551616);
select left('hello', -18446744073709551617);
select left('hello', 18446744073709551617);
+--enable_view_protocol
select right('hello', 10);
select right('hello', 0);
select right('hello', -1);
select right('hello', -4294967295);
+#enable after fix MDEV-29552
+--disable_view_protocol
select right('hello', 4294967295);
+--enable_view_protocol
select right('hello', -4294967296);
+#enable after fix MDEV-29552
+--disable_view_protocol
select right('hello', 4294967296);
+--enable_view_protocol
select right('hello', -4294967297);
+#enable after fix MDEV-29552
+--disable_view_protocol
select right('hello', 4294967297);
+--enable_view_protocol
+#view protocol generates additional warning
+--disable_view_protocol
select right('hello', -18446744073709551615);
select right('hello', 18446744073709551615);
select right('hello', -18446744073709551616);
select right('hello', 18446744073709551616);
select right('hello', -18446744073709551617);
select right('hello', 18446744073709551617);
+--enable_view_protocol
select substring('hello', 2, -1);
@@ -1002,12 +1057,17 @@ select substring('hello', -4294967296, 1);
select substring('hello', 4294967296, 1);
select substring('hello', -4294967297, 1);
select substring('hello', 4294967297, 1);
+#view protocol generates additional warning
+--disable_view_protocol
select substring('hello', -18446744073709551615, 1);
select substring('hello', 18446744073709551615, 1);
select substring('hello', -18446744073709551616, 1);
select substring('hello', 18446744073709551616, 1);
select substring('hello', -18446744073709551617, 1);
select substring('hello', 18446744073709551617, 1);
+--enable_view_protocol
+#enable after fix MDEV-28652
+--disable_view_protocol
select substring('hello', 1, -1);
select substring('hello', 1, -4294967295);
select substring('hello', 1, 4294967295);
@@ -1015,12 +1075,16 @@ select substring('hello', 1, -4294967296);
select substring('hello', 1, 4294967296);
select substring('hello', 1, -4294967297);
select substring('hello', 1, 4294967297);
+--enable_view_protocol
+#view protocol generates additional warning
+--disable_view_protocol
select substring('hello', 1, -18446744073709551615);
select substring('hello', 1, 18446744073709551615);
select substring('hello', 1, -18446744073709551616);
select substring('hello', 1, 18446744073709551616);
select substring('hello', 1, -18446744073709551617);
select substring('hello', 1, 18446744073709551617);
+--enable_view_protocol
select substring('hello', -1, -1);
select substring('hello', -4294967295, -4294967295);
select substring('hello', 4294967295, 4294967295);
@@ -1028,12 +1092,15 @@ select substring('hello', -4294967296, -4294967296);
select substring('hello', 4294967296, 4294967296);
select substring('hello', -4294967297, -4294967297);
select substring('hello', 4294967297, 4294967297);
+#view protocol generates additional warning
+--disable_view_protocol
select substring('hello', -18446744073709551615, -18446744073709551615);
select substring('hello', 18446744073709551615, 18446744073709551615);
select substring('hello', -18446744073709551616, -18446744073709551616);
select substring('hello', 18446744073709551616, 18446744073709551616);
select substring('hello', -18446744073709551617, -18446744073709551617);
select substring('hello', 18446744073709551617, 18446744073709551617);
+--enable_view_protocol
select insert('hello', -1, 1, 'hi');
select insert('hello', -4294967295, 1, 'hi');
@@ -1068,12 +1135,15 @@ select insert('hello', -4294967296, -4294967296, 'hi');
select insert('hello', 4294967296, 4294967296, 'hi');
select insert('hello', -4294967297, -4294967297, 'hi');
select insert('hello', 4294967297, 4294967297, 'hi');
+#enable after fix MDEV-27871
+--disable_view_protocol
select insert('hello', -18446744073709551615, -18446744073709551615, 'hi');
select insert('hello', 18446744073709551615, 18446744073709551615, 'hi');
select insert('hello', -18446744073709551616, -18446744073709551616, 'hi');
select insert('hello', 18446744073709551616, 18446744073709551616, 'hi');
select insert('hello', -18446744073709551617, -18446744073709551617, 'hi');
select insert('hello', 18446744073709551617, 18446744073709551617, 'hi');
+--enable_view_protocol
select repeat('hello', -1);
select repeat('hello', -4294967295);
@@ -1082,12 +1152,15 @@ select repeat('hello', -4294967296);
select repeat('hello', 4294967296);
select repeat('hello', -4294967297);
select repeat('hello', 4294967297);
+#view protocol generates additional warning
+--disable_view_protocol
select repeat('hello', -18446744073709551615);
select repeat('hello', 18446744073709551615);
select repeat('hello', -18446744073709551616);
select repeat('hello', 18446744073709551616);
select repeat('hello', -18446744073709551617);
select repeat('hello', 18446744073709551617);
+--enable_view_protocol
select space(-1);
select space(-4294967295);
@@ -1096,12 +1169,15 @@ select space(-4294967296);
select space(4294967296);
select space(-4294967297);
select space(4294967297);
+#view protocol generates additional warning
+--disable_view_protocol
select space(-18446744073709551615);
select space(18446744073709551615);
select space(-18446744073709551616);
select space(18446744073709551616);
select space(-18446744073709551617);
select space(18446744073709551617);
+--enable_view_protocol
select rpad('hello', -1, '1');
select rpad('hello', -4294967295, '1');
@@ -1110,12 +1186,15 @@ select rpad('hello', -4294967296, '1');
select rpad('hello', 4294967296, '1');
select rpad('hello', -4294967297, '1');
select rpad('hello', 4294967297, '1');
+#view protocol generates additional warning
+--disable_view_protocol
select rpad('hello', -18446744073709551615, '1');
select rpad('hello', 18446744073709551615, '1');
select rpad('hello', -18446744073709551616, '1');
select rpad('hello', 18446744073709551616, '1');
select rpad('hello', -18446744073709551617, '1');
select rpad('hello', 18446744073709551617, '1');
+--enable_view_protocol
select rpad('hello', -1);
select rpad('hello', -4294967295);
select rpad('hello', 4294967295);
@@ -1123,12 +1202,15 @@ select rpad('hello', -4294967296);
select rpad('hello', 4294967296);
select rpad('hello', -4294967297);
select rpad('hello', 4294967297);
+#view protocol generates additional warning
+--disable_view_protocol
select rpad('hello', -18446744073709551615);
select rpad('hello', 18446744073709551615);
select rpad('hello', -18446744073709551616);
select rpad('hello', 18446744073709551616);
select rpad('hello', -18446744073709551617);
select rpad('hello', 18446744073709551617);
+--enable_view_protocol
select rpad('hello', 0, 'x');
select rpad('hello', 0);
@@ -1139,12 +1221,15 @@ select lpad('hello', -4294967296, '1');
select lpad('hello', 4294967296, '1');
select lpad('hello', -4294967297, '1');
select lpad('hello', 4294967297, '1');
+#view protocol generates additional warning
+--disable_view_protocol
select lpad('hello', -18446744073709551615, '1');
select lpad('hello', 18446744073709551615, '1');
select lpad('hello', -18446744073709551616, '1');
select lpad('hello', 18446744073709551616, '1');
select lpad('hello', -18446744073709551617, '1');
select lpad('hello', 18446744073709551617, '1');
+--enable_view_protocol
select lpad('hello', -1);
select lpad('hello', -4294967295);
select lpad('hello', 4294967295);
@@ -1152,12 +1237,15 @@ select lpad('hello', -4294967296);
select lpad('hello', 4294967296);
select lpad('hello', -4294967297);
select lpad('hello', 4294967297);
+#view protocol generates additional warning
+--disable_view_protocol
select lpad('hello', -18446744073709551615);
select lpad('hello', 18446744073709551615);
select lpad('hello', -18446744073709551616);
select lpad('hello', 18446744073709551616);
select lpad('hello', -18446744073709551617);
select lpad('hello', 18446744073709551617);
+--enable_view_protocol
select lpad('hello', 0, 'x');
select lpad('hello', 0);
@@ -1329,7 +1417,9 @@ DROP VIEW v1;
create table t1(a float);
insert into t1 values (1.33);
--enable_metadata
+--disable_view_protocol
select format(a, 2) from t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -1398,6 +1488,8 @@ CREATE TABLE t2 (a VARCHAR(20), b INT);
INSERT INTO t1 VALUES ('ABC', 1);
INSERT INTO t2 VALUES ('ABC', 1);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
@@ -1406,6 +1498,7 @@ SELECT DECODE((SELECT ENCODE('secret', 'ABC') FROM t1,t2 WHERE t1.a = t2.a GROUP
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), 'ABC')
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
+--enable_view_protocol
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
@@ -1413,8 +1506,11 @@ TRUNCATE TABLE t2;
INSERT INTO t1 VALUES ('EDF', 3), ('BCD', 2), ('ABC', 1);
INSERT INTO t2 VALUES ('EDF', 3), ('BCD', 2), ('ABC', 1);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b LIMIT 1), t2.a)
FROM t2 WHERE t2.b = 1 GROUP BY t2.b;
+--enable_view_protocol
DROP TABLE t1, t2;
@@ -1432,7 +1528,10 @@ DROP TABLE t1;
--echo # Bug#57810 case/when/then : Assertion failed: length || !scale
--echo #
SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1));
+#view protocol generates additional warning
+--disable_view_protocol
SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
+--enable_view_protocol
--echo #
--echo # Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail
@@ -1514,7 +1613,10 @@ DROP TABLE t;
# WL#4584 Internationalized number format
#
SELECT format(12345678901234567890.123, 3);
+#view protocol generates additional warning
+--disable_view_protocol
SELECT format(12345678901234567890.123, 3, NULL);
+--disable_view_protocol
SELECT format(12345678901234567890.123, 3, 'ar_AE');
SELECT format(12345678901234567890.123, 3, 'ar_SA');
SELECT format(12345678901234567890.123, 3, 'be_BY');
@@ -1571,17 +1673,23 @@ SELECT CONV(1,-2147483648,-2147483648);
--echo # Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT (rpad(1.0,2048,1)) IS NOT FALSE;
SELECT ((+0) IN
((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
(32767.1)));
SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
+--enable_view_protocol
--error 1690
SELECT
pow((rpad(10.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
+#enable after fix MDEV-28585
+--disable_view_protocol
SELECT stddev_samp(rpad(1.0,2048,1));
+--enable_view_protocol
SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)));
SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc));
@@ -1979,11 +2087,13 @@ DROP TABLE t1;
--echo # MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
--echo #
+#check and enable after fix MDEV-28536
+--disable_view_protocol
CREATE TABLE t1 (a INT, b TIME, c TIME);
INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
DROP TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # End of 10.1 tests
@@ -1998,7 +2108,10 @@ DROP TABLE t1;
--echo # MDEV-24742 Server crashes in Charset::numchars / String::numchars
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT NULL IN (RIGHT(AES_ENCRYPT('foo','bar'), LAST_INSERT_ID()), 'qux');
+--enable_view_protocol
--echo #
--echo # Bug#31374305 - FORMAT() NOT DISPLAYING WHOLE NUMBER SIDE CORRECTLY
@@ -2049,6 +2162,7 @@ DROP TABLE locale_format;
--echo #
--echo # MDEV-12685 Oracle-compatible function CHR()
--echo #
+--disable_service_connection
select chr(65);
create database mysqltest1 CHARACTER SET = 'utf8' COLLATE = 'utf8_bin';
use mysqltest1;
@@ -2056,6 +2170,7 @@ select charset(chr(65)), length(chr(65)),char_length(chr(65));
select charset(chr(14844588)), length(chr(14844588)),char_length(chr(14844588));
drop database mysqltest1;
use test;
+--enable_service_connection
--echo #
--echo # MDEV-12592 Illegal mix of collations with the HEX function
diff --git a/mysql-test/main/func_system.test b/mysql-test/main/func_system.test
index d9f2bda750a..7b88b6f36ee 100644
--- a/mysql-test/main/func_system.test
+++ b/mysql-test/main/func_system.test
@@ -65,12 +65,13 @@ drop table t1;
--echo
--echo
+--disable_service_connection
SET NAMES utf8;
create database betäubungsmittelverschreibungsverordnung;
use betäubungsmittelverschreibungsverordnung;
select database() as "database" union all select database();
drop database betäubungsmittelverschreibungsverordnung;
-
+--enable_service_connection
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/main/func_test.test b/mysql-test/main/func_test.test
index 570fd0ae87a..02b08d13dbe 100644
--- a/mysql-test/main/func_test.test
+++ b/mysql-test/main/func_test.test
@@ -6,7 +6,10 @@ drop table if exists t1,t2;
#
select 0=0,1>0,1>=1,1<0,1<=0,1!=0,strcmp("abc","abcd"),strcmp("b","a"),strcmp("a","a") ;
select "a"<"b","a"<="b","b">="a","b">"a","a"="A","a"<>"b";
-select "a "="A", "A "="a", "a " <= "A b";
+#enable after fix MDEV-28535
+--disable_view_protocol
+select "a "="A", "A "="a", "a " <= "A b";
+--enable_view_protocol
select "abc" like "a%", "abc" not like "%d%", "a%" like "a\%","abc%" like "a%\%","abcd" like "a%b_%d", "a" like "%%a","abcde" like "a%_e","abc" like "abc%";
select "a" like "%%b","a" like "%%ab","ab" like "a\%", "ab" like "_", "ab" like "ab_", "abc" like "%_d", "abc" like "abc%d";
select '?' like '|%', '?' like '|%' ESCAPE '|', '%' like '|%', '%' like '|%' ESCAPE '|', '%' like '%';
@@ -15,7 +18,10 @@ select "Det här är svenska" regexp "h[[:alpha:]]+r", "aba" regexp "^(a|b)*$";
select "aba" regexp concat("^","a");
select !0,NOT 0=1,!(0=0),1 AND 1,1 && 0,0 OR 1,1 || NULL, 1=1 or 1=1 and 1=0;
select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between "max" and "my" and 3=3;
+#enable after fix MDEV-28535
+--disable_view_protocol
select 'b' between 'a' and 'c', 'B' between 'a' and 'c';
+--enable_view_protocol
select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0);
select -1.49 or -1.49,0.6 or 0.6;
select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1;
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index 2ae79d41694..91b846e4c61 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -12,7 +12,10 @@ select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(
select period_add("9602",-12),period_diff(199505,"9404") ;
select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_timestamp(now());
+#enable after fix MDEV-27871
+--disable_view_protocol
select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0;
+--enable_view_protocol
select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"),
sec_to_time(time_to_sec("0:30:47")/6.21);
select sec_to_time(9001.1), time_to_sec('15:12:22.123456'), time_to_sec(15.5566778899);
@@ -24,11 +27,14 @@ select sec_to_time(-9001.1), sec_to_time(-9001.1) / 1,
select sec_to_time(90011e-1), sec_to_time(1234567890123e30);
select sec_to_time(1234567890123), sec_to_time('99999999999999999999999999999');
select now()-curdate()*1000000-curtime();
+#enable after fix MDEV-27871
+--disable_view_protocol
select strcmp(current_timestamp(),concat(current_date()," ",current_time()));
select strcmp(localtime(),concat(current_date()," ",current_time()));
select strcmp(localtimestamp(),concat(current_date()," ",current_time()));
select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w");
select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w"));
+--enable_view_protocol
select dayofmonth("1997-01-02"),dayofmonth(19970323);
select month("1997-01-02"),year("98-02-03"),dayofyear("1997-12-31");
select month("2001-02-00"),year("2001-00-00");
@@ -78,8 +84,11 @@ select time_format(000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T'),date_format(199801310000
select time_format(010203,'%H|%I|%k|%l|%i|%p|%r|%S|%T'),date_format(19980131010203,'%H|%I|%k|%l|%i|%p|%r|%S|%T');
select time_format(131415,'%H|%I|%k|%l|%i|%p|%r|%S|%T'),date_format(19980131131415,'%H|%I|%k|%l|%i|%p|%r|%S|%T');
select time_format(010015,'%H|%I|%k|%l|%i|%p|%r|%S|%T'),date_format(19980131010015,'%H|%I|%k|%l|%i|%p|%r|%S|%T');
+#enable after fix MDEV-27871
+--disable_view_protocol
select date_format(concat('19980131',131415),'%H|%I|%k|%l|%i|%p|%r|%S|%T| %M|%W|%D|%Y|%y|%a|%b|%j|%m|%d|%h|%s|%w');
select date_format(19980021000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T| %M|%W|%D|%Y|%y|%a|%b|%j|%m|%d|%h|%s|%w');
+--enable_view_protocol
select date_add("1997-12-31 23:59:59",INTERVAL 1 SECOND);
select date_add("1997-12-31 23:59:59",INTERVAL 1 MINUTE);
select date_add("1997-12-31 23:59:59",INTERVAL 1 HOUR);
@@ -118,9 +127,12 @@ select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" MINUTE_SECOND);
select date_add("1997-12-31 23:59:59",INTERVAL "-10000:1" HOUR_MINUTE);
select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" DAY_HOUR);
select date_add("1997-12-31 23:59:59",INTERVAL "-100 1" YEAR_MONTH);
+#enable after fix MDEV-27871
+--disable_view_protocol
select date_add("1997-12-31 23:59:59",INTERVAL "10000:99:99" HOUR_SECOND);
select date_add("1997-12-31 23:59:59",INTERVAL " -10000 99:99" DAY_MINUTE);
select date_add("1997-12-31 23:59:59",INTERVAL "10000 99:99:99" DAY_SECOND);
+--enable_view_protocol
select "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
select INTERVAL 1 DAY + "1997-12-31";
select "1998-01-01 00:00:00" - INTERVAL 1 SECOND;
@@ -169,15 +181,22 @@ SELECT EXTRACT(QUARTER FROM '2004-12-15') AS quarter;
#
# MySQL Bugs: #12356: DATE_SUB or DATE_ADD incorrectly returns null
#
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+--enable_view_protocol
#
# Test big intervals (Bug #3498)
#
SELECT "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND;
SELECT "1900-01-01 00:00:00" + INTERVAL "1:2147483647" MINUTE_SECOND;
-SELECT "1900-01-01 00:00:00" + INTERVAL "100000000:214748364700" MINUTE_SECOND;SELECT "1900-01-01 00:00:00" + INTERVAL 1<<37 SECOND;
+#enable after fix MDEV-27871
+--disable_view_protocol
+SELECT "1900-01-01 00:00:00" + INTERVAL "100000000:214748364700" MINUTE_SECOND;
+--disable_view_protocol
+SELECT "1900-01-01 00:00:00" + INTERVAL 1<<37 SECOND;
SELECT "1900-01-01 00:00:00" + INTERVAL 1<<31 MINUTE;
SELECT "1900-01-01 00:00:00" + INTERVAL 1<<20 HOUR;
@@ -426,9 +445,12 @@ select last_day("1997-12-1")+0.0;
# Test SAPDB UTC_% functions. This part is TZ dependant (It is supposed that
# TZ variable set to GMT-3
+#enable after fix MDEV-27871
+--disable_view_protocol
select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0;
select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0;
select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0;
+--enable_view_protocol
select strcmp(date_format(utc_timestamp(),"%T"), utc_time())=0;
select strcmp(date_format(utc_timestamp(),"%Y-%m-%d"), utc_date())=0;
select strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0;
@@ -455,8 +477,11 @@ select last_day('2005-01-00');
# Bug #18501: monthname and NULLs
#
+#enable after fix MDEV-28535
+--disable_view_protocol
select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
+--enable_view_protocol
#
# Bug #16327: problem with timestamp < 1970
@@ -730,7 +755,10 @@ set time_zone= @@global.time_zone;
#
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+#enable after fix MDEV-27871
+--disable_view_protocol
select str_to_date("1997-00-04 22:23:00","%Y-%m-%D") + interval 10 minute;
+--enable_view_protocol
#
# Bug #21103: DATE column not compared as DATE
@@ -767,6 +795,7 @@ SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SE
#
# Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
#
+--disable_service_connection
set names latin1;
create table t1 (a varchar(15) character set ascii not null);
insert into t1 values ('070514-000000');
@@ -787,6 +816,7 @@ set lc_time_names=fr_FR;
select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
set lc_time_names=en_US;
drop table t1;
+--enable_service_connection
#
# Bug#32180: DATE_ADD treats datetime numeric argument as DATE
@@ -818,7 +848,10 @@ select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND;
# show that we treat fractions of seconds correctly (zerofill from right to
# six places) even if we left out fields on the left.
+#enable after fix MDEV-27871
+--disable_view_protocol
select date_add('1000-01-01 00:00:00', interval '1.03:02:01.05' day_microsecond);
+--enable_view_protocol
select date_add('1000-01-01 00:00:00', interval '1.02' day_microsecond);
@@ -1059,14 +1092,19 @@ SET timestamp=DEFAULT;
SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
SELECT UNIX_TIMESTAMP('2015-06-00');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
-
+--enable_view_protocol
set sql_mode= 'TRADITIONAL';
SELECT @@sql_mode;
SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
SELECT UNIX_TIMESTAMP('2015-06-00');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
+--enable_view_protocol
set sql_mode= default;
@@ -1095,7 +1133,10 @@ select time('10 02:03:04') + interval 1 year;
# specially constructed queries to reach obscure places in the code
# not touched by the more "normal" queries (and to increase the coverage)
select cast('131415.123e0' as time);
+#enable after fix MDEV-27871
+--disable_view_protocol
select cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04';
+--enable_view_protocol
select least(time('1:2:3'), '01:02:04', null) div 1;
select truncate(least(time('1:2:3'), '01:02:04', null), 6);
select cast(least(time('1:2:3'), '01:02:04', null) as decimal(3,1));
@@ -1132,9 +1173,12 @@ drop table t1;
#
# lp:731815 Crash/valgrind warning Item::send with 5.1-micro
#
+#enable after fix MDEV-27871
+--disable_view_protocol
SET timestamp=unix_timestamp('2001-02-03 10:20:30');
select convert_tz(timediff('0000-00-00 00:00:00', cast('2008-03-26 07:09:06' as datetime)), 'UTC', 'Europe/Moscow');
SET timestamp=DEFAULT;
+--enable_view_protocol
#
# lp:736370 Datetime functions in subquery context cause wrong result and bogus warnings in mysql-5.1-micr
@@ -1205,10 +1249,13 @@ drop table t1;
SET timestamp=UNIX_TIMESTAMP('2014-06-01 10:20:30');
select greatest(cast("0-0-0" as date), cast("10:20:05" as time));
+#enable after fix MDEV-27871
+--disable_view_protocol
select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '0000-00-00';
select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01';
select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01 10:20:05';
select cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6));
+--enable_view_protocol
SET timestamp=DEFAULT;
select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010');
@@ -1603,7 +1650,9 @@ SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DAT
--echo # MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL)
--echo #
--enable_metadata
+--disable_view_protocol
SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE);
+--enable_view_protocol
--disable_metadata
--echo #
@@ -1805,6 +1854,8 @@ SELECT
--echo #
--echo # MDEV-10787 Assertion `ltime->neg == 0' failed in void date_to_datetime(MYSQL_TIME*)
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
CREATE TABLE t1 (d DATE);
INSERT INTO t1 VALUES ('2005-07-20'),('2012-12-21');
SELECT REPLACE( ADDDATE( d, INTERVAL 0.6732771076944444 HOUR_SECOND ), '2', 'x' ) FROM t1;
@@ -1824,6 +1875,7 @@ SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:0:315569433599' DAY_SECOND);
SELECT ADDDATE(DATE'0000-01-01', INTERVAL '3652423:0:0:315569433559' DAY_SECOND);
SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:0:315569433559' DAY_SECOND);
SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:315569433599' DAY_SECOND);
+--disable_view_protocol
--echo #
--echo # MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime
@@ -1886,7 +1938,9 @@ INSERT INTO t1 VALUES ('1999-12-31 23:59:59.999999');
--vertical_results
--enable_metadata
--disable_ps_protocol
+--disable_view_protocol
--eval $query
+--enable_view_protocol
--enable_ps_protocol
--disable_metadata
--horizontal_results
@@ -1904,7 +1958,9 @@ INSERT INTO t1 VALUES ('-838:59:59.999999'),('838:59:59.999999');
--vertical_results
--enable_metadata
--disable_ps_protocol
+--disable_view_protocol
--eval $query
+--enable_view_protocol
--enable_ps_protocol
--disable_metadata
--horizontal_results
@@ -3160,7 +3216,10 @@ SELECT TIME('0001:01:01-'), TIME('0001:01:01--');
SELECT TIME('-xxx'), TIME('-xxxxxxxxxxxxxxxxxxxx');
SELECT TIME('- '), TIME('- ');
+#enable after fix MDEV-28535
+--disable_view_protocol
SELECT TIME('-'), TIME('-');
+--enable_view_protocol
SELECT TIME('1-1-1 1:1:1'), TIME('1-1-1 1:1:1.0');
SELECT TIME('1-1-1 1:2:3'), TIME('1-1-1 1:2:3.0');
@@ -3175,11 +3234,12 @@ SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
--echo #
--echo # MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on SELECT with NULLIF and FROM_UNIXTIME on incorrect time
--echo #
-
+#enable after fix MDEV-29534
+--disable_view_protocol
SET time_zone='+00:00';
SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
SET time_zone=DEFAULT;
-
+--enable_view_protocol
--echo #
--echo # MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date
diff --git a/mysql-test/main/func_time_hires.test b/mysql-test/main/func_time_hires.test
index 35fd36b8456..dca8d458f8a 100644
--- a/mysql-test/main/func_time_hires.test
+++ b/mysql-test/main/func_time_hires.test
@@ -30,8 +30,11 @@ show create table t1;
--query_vertical select * from t1
drop table t1;
+#enable after fix MDEV-28535
+--disable_view_protocol
--query_vertical select unix_timestamp('2011-01-01 01:01:01'), unix_timestamp('2011-01-01 01:01:01.123456'), unix_timestamp(cast('2011-01-01 01:01:01.123456' as datetime(0))), unix_timestamp(cast('2011-01-01 01:01:01.123456' as datetime(4)));
--query_vertical select from_unixtime(unix_timestamp('2011/1/1 1:1:1')), from_unixtime(unix_timestamp('2011/1/1 1:1:1.123456')), from_unixtime(unix_timestamp(cast('2011/1/1 1:1:1.123456' as datetime(0)))), from_unixtime(unix_timestamp(cast('2011/1/1 1:1:1.123456' as datetime(4))));
+--enable_view_protocol
select sec_to_time(3020399.99999), sec_to_time(3020399.999999), sec_to_time(3020399.9999999);
select sec_to_time(-3020399.99999), sec_to_time(-3020399.999999), sec_to_time(-3020399.9999999);
@@ -80,7 +83,10 @@ select CAST(@a AS DATETIME(7));
SELECT CONVERT_TZ('2011-01-02 12:00:00', '+00:00', '+03:00');
SELECT CONVERT_TZ('2011-01-02 12:00:00.123', '+00:00', '+03:00');
SELECT CONVERT_TZ('2011-01-02 12:00:00.123456', '+00:00', '+03:00');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CONVERT_TZ(CAST('2010-10-10 10:10:10.123456' AS DATETIME(4)), '+00:00', '+03:00');
+--enable_view_protocol
#
# Field::store_time()
diff --git a/mysql-test/main/func_time_round.test b/mysql-test/main/func_time_round.test
index 12d3a50a10f..79f9ec289a0 100644
--- a/mysql-test/main/func_time_round.test
+++ b/mysql-test/main/func_time_round.test
@@ -126,6 +126,8 @@ SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER B
--echo # Functions with a single TIME interval input, conversion from TIME-interval-in-VARCHAR
--echo #
+#enable after fix MDEV-29525
+--disable_view_protocol
SELECT
EXTRACT(DAY FROM a),
EXTRACT(HOUR FROM a),
@@ -135,6 +137,7 @@ SELECT
CAST(a AS INTERVAL DAY_SECOND(6)),
a
FROM t1_time_in_varchar ORDER BY id;
+--enable_view_protocol
SELECT
TIME_TO_SEC(a),
@@ -146,6 +149,8 @@ FROM t1_time_in_varchar ORDER BY id;
--echo # Functions with a single TIME interval input, conversion from TIME-interval-in-DECIMAL
--echo #
+#enable after fix MDEV-29525
+--disable_view_protocol
SELECT
EXTRACT(DAY FROM a),
EXTRACT(HOUR FROM a),
@@ -155,6 +160,7 @@ SELECT
CAST(a AS INTERVAL DAY_SECOND(6)),
a
FROM t1_time_in_decimal ORDER BY id;
+--enable_view_protocol
SELECT
TIME_TO_SEC(a),
diff --git a/mysql-test/main/get_diagnostics.test b/mysql-test/main/get_diagnostics.test
index 3c2b435af7f..86643db3b5a 100644
--- a/mysql-test/main/get_diagnostics.test
+++ b/mysql-test/main/get_diagnostics.test
@@ -357,10 +357,13 @@ SHOW WARNINGS;
--echo # Statement information runtime
--echo
+#enable after fix MDEV-28535
+--disable_view_protocol
SELECT CAST(-19999999999999999999 AS SIGNED),
CAST(-19999999999999999999 AS SIGNED);
GET DIAGNOSTICS @var = NUMBER;
SELECT @var;
+--enable_view_protocol
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
GET DIAGNOSTICS @var = NUMBER;
diff --git a/mysql-test/main/gis-debug.test b/mysql-test/main/gis-debug.test
index 0e11c11e5b5..1c6bf5fcb19 100644
--- a/mysql-test/main/gis-debug.test
+++ b/mysql-test/main/gis-debug.test
@@ -161,12 +161,14 @@ SET SESSION debug_dbug="-d,cmp_item";
--echo # MDEV-19994 Add class Function_collection
--echo #
+--disable_service_connection
SET SESSION debug_dbug="+d,make_item_func_call_native_simulate_not_found";
--error ER_PARSE_ERROR
SELECT CONTAINS(POINT(1,1),POINT(1,1));
--error ER_PARSE_ERROR
SELECT WITHIN(POINT(1,1),POINT(1,1));
SET SESSION debug_dbug="-d,make_item_func_call_native_simulate_not_found";
+--enable_service_connection
--echo #
--echo # MDEV-20009 Add CAST(expr AS pluggable_type)
diff --git a/mysql-test/main/gis-json.test b/mysql-test/main/gis-json.test
index ff6298c50a6..0e1b24a91b6 100644
--- a/mysql-test/main/gis-json.test
+++ b/mysql-test/main/gis-json.test
@@ -1,5 +1,7 @@
-- source include/have_geometry.inc
+#enable after fix MDEV-27871
+--disable_view_protocol
select st_asgeojson(geomfromtext('POINT(1 1)'));
select st_asgeojson(geomfromtext('LINESTRING(10 10,20 10,20 20,10 20,10 10)'));
select st_asgeojson(geomfromtext('POLYGON((10 10,20 10,20 20,10 20,10 10))'));
@@ -15,14 +17,18 @@ SELECT st_astext(st_geomfromgeojson('{"type":"multipoint","coordinates":[[1,2],[
SELECT st_astext(st_geomfromgeojson('{"type": "multilinestring", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}'));
SELECT st_astext(st_geomfromgeojson('{"type": "multipolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}'));
SELECT st_astext(st_geomfromgeojson('{"type": "GeometryCollection", "geometries": [{"type": "Point","coordinates": [100.0, 0.0]}, {"type": "LineString","coordinates": [[101.0, 0.0],[102.0, 1.0]]}]}'));
+--enable_view_protocol
SELECT st_astext(st_geomfromgeojson('{"type":"point"}'));
SELECT st_astext(st_geomfromgeojson('{"type":"point"'));
SELECT st_astext(st_geomfromgeojson('{"type""point"}'));
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'));
SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'));
+
--error ER_WRONG_VALUE_FOR_TYPE
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',5));
@@ -33,6 +39,8 @@ SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',3));
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',4));
+--enable_view_protocol
+
SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.363 7.266)'),2);
SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.363 7.266)'),1);
SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.363 7.266)'),10);
@@ -44,6 +52,8 @@ SELECT st_astext(st_geomfromgeojson('{"type": "MultiLineString","coordinates": [
SELECT st_astext(st_geomfromgeojson('{"type": "Polygon","coordinates": []}')) as a;
SELECT st_astext(st_geomfromgeojson('{"type": "MultiPolygon","coordinates": []}')) as a;
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }");
#
@@ -53,6 +63,9 @@ SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }");
SELECT ST_ASTEXT (ST_GEOMFROMGEOJSON ('{ "type": "GEOMETRYCOLLECTION", "coordinates": [102.0, 0.0]}'));
SELECT ST_ASTEXT(ST_GEOMFROMGEOJSON('{"type": ["POINT"], "coINates": [0,0] }'));
+
+--enable_view_protocol
+
--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/gis-precise.test b/mysql-test/main/gis-precise.test
index da72a0c4d8a..3580ddfc076 100644
--- a/mysql-test/main/gis-precise.test
+++ b/mysql-test/main/gis-precise.test
@@ -9,13 +9,15 @@
DROP TABLE IF EXISTS t1;
--enable_warnings
+#enable after fix MDEV-27871
+--disable_view_protocol
select 1, ST_Intersects(GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))'));
select 0, ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))'));
select 1, ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POINT(10 10)'));
select 1, ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
select 0, ST_Within(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
select 1, ST_Within(GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))'));
-
+--enable_view_protocol
create table t1 (g point);
insert into t1 values
@@ -36,6 +38,8 @@ select astext(g) from t1 where ST_Contains(GeomFromText('POLYGON((5 1, 7 1, 7 7,
DROP TABLE t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
select 0, ST_Within(GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
select 1, ST_Within(GeomFromText('LINESTRING(15 15, 16 16)'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
@@ -80,6 +84,8 @@ select astext(ST_symdifference(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), ge
--replace_result 7.999999999999999 8
select astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')));
+--enable_view_protocol
+
# Buffer() tests
--replace_result 0012045437948276 00120454379482759
select astext(ST_buffer(geometryfromtext('point(1 1)'), 1));
@@ -97,6 +103,9 @@ select ST_NUMPOINTS(ST_EXTERIORRING(@buff));
# cleanup
DROP TABLE t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
#Touches tests
select st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)'));
select st_touches(geomfromtext('point(1 1)'), geomfromtext('point(1 1)'));
@@ -111,6 +120,7 @@ SELECT ST_Equals(PolyFromText('POLYGON((67 13, 67 18, 67 18, 59 18, 59 13, 67 13
SELECT ST_Equals(PolyFromText('POLYGON((67 13, 67 18, 67 18, 59 18, 59 13, 67 13) )'),PolyFromText('POLYGON((67 13, 67 18, 59 18, 59 13, 59 13, 67 13) )')) as result;
SELECT ST_Equals(PointFromText('POINT (12 13)'),PointFromText('POINT (12 13)')) as result;
+--enable_view_protocol
--echo #
--echo # BUG#11755628/47429: INTERSECTION FUNCTION CRASHED MYSQLD
@@ -140,19 +150,30 @@ SELECT ASTEXT(TOUCHES(@a, GEOMFROMTEXT('point(0 0)'))) t;
# bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
+#enable after fix MDEV-27871
+--disable_view_protocol
+
SELECT astext(ST_UNION (
PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'),
ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))')))));
+--enable_view_protocol
+
#bug 801189 ST_BUFFER asserts if radius = 0
SELECT astext(ST_BUFFER(LineStringFromText('LINESTRING(0 0,1 1)'),0));
+#enable after fix MDEV-27871
+--disable_view_protocol
#bug 801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT
SELECT Round(ST_Area(ST_BUFFER(MultipointFromText('MULTIPOINT(7 7,3 7,7 2,7 4 ,7 7)'), 3)), 5);
+--enable_view_protocol
#bug 801212 Assertion with ST_INTERSECTION on NULL values
SELECT ST_INTERSECTION(NULL, NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
+
#bug 804305 Crash in wkb_get_double with ST_INTERSECTION
SELECT ASTEXT(ST_INTERSECTION(
MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),
@@ -382,6 +403,8 @@ SELECT ST_RELATE(
'F*FFFF**F'
) as relate_res;
+--enable_view_protocol
+
# MDEV-18920 Prepared statements with st_convexhull hang and eat 100% cpu.
prepare s from 'do st_convexhull(st_aswkb(multipoint(point(-11702,15179),point(-5031,27960),point(-30557,11158),point(-27804,30314))))';
execute s;
@@ -421,6 +444,8 @@ SELECT ST_DISTANCE_SPHERE(1, 1, NULL);
--error ER_INTERNAL_ERROR
SELECT ST_DISTANCE_SPHERE(ST_GEOMFROMTEXT('POINT(1 0)'), ST_GEOMFROMTEXT('LINESTRING(0 0, 1 1)'));
+#enable after fix MDEV-27871
+--disable_view_protocol
--echo # Test Points and radius
SELECT ST_DISTANCE_SPHERE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'));
# make bb x86 happy
@@ -455,6 +480,8 @@ SELECT TRUNCATE(ST_DISTANCE_SPHERE(ST_GEOMFROMTEXT('MULTIPOINT(1 2,1 1 )'), ST_G
--error ER_INTERNAL_ERROR
SELECT ST_DISTANCE_SPHERE(ST_GEOMFROMTEXT('MULTIPOINT(1 2,1 1 )'), ST_GEOMFROMTEXT('MULTIPOINT(8 9,3 4 )'),0);
+--enable_view_protocol
+
# Longitude out of range [-180,180]
set @pt1 = ST_GeomFromText('POINT(190 -30)');
set @pt2 = ST_GeomFromText('POINT(-30 50)');
diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test
index 17a93291b77..f0c9a69c503 100644
--- a/mysql-test/main/gis.test
+++ b/mysql-test/main/gis.test
@@ -122,6 +122,8 @@ SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection;
SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection;
explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
+#query plan for view protocol doesn't contain database name
+--disable_view_protocol
SELECT g1.fid as first, g2.fid as second,
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
@@ -132,6 +134,7 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
+--enable_view_protocol
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
@@ -377,13 +380,18 @@ insert into t1 values (pointfromtext('point(1,1)'));
drop table t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
+--enable_view_protocol
--enable_metadata
+--disable_view_protocol
create table t1 (g GEOMETRY);
select * from t1;
select asbinary(g) from t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -750,12 +758,15 @@ SET @a=POLYFROMWKB(@a);
# Bug #57321 crashes and valgrind errors from spatial types
#
+#The SELECT statement cannot contain a subquery in the FROM clause
+#fore --view-protocol
+--disable_view_protocol
create table t1(a geometry NOT NULL)engine=myisam;
insert into t1 values (geomfromtext("point(0 1)"));
insert into t1 values (geomfromtext("point(1 0)"));
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
drop table t1;
-
+--enable_view_protocol
--echo #
--echo # Test for bug #59888 "debug assertion when attempt to create spatial index
@@ -835,6 +846,8 @@ select astext(0x0100000000030000000100000000000010);
select astext(st_centroid(0x0100000000030000000100000000000010));
select astext(st_exteriorring(0x0100000000030000000100000000000010));
select envelope(0x0100000000030000000100000000000010);
+#enable after fix MDEV-27871
+--disable_view_protocol
select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
@@ -856,6 +869,7 @@ select ST_AREA(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 1
#bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs
select ST_LENGTH(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 100 30, 20 30), POINT(3 3), LINESTRING(20 20, 30 20))'));
+--enable_view_protocol
# Conformance tests
#
@@ -1164,6 +1178,9 @@ SELECT AsText(EndPoint(centerline))
FROM road_segments
WHERE fid = 102;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
SELECT IsClosed(LineFromWKB(AsBinary(Boundary(boundary)),SRID(boundary)))
FROM named_places
WHERE name = 'Goose Island';
@@ -1173,6 +1190,8 @@ SELECT IsRing(LineFromWKB(AsBinary(Boundary(boundary)),SRID(boundary)))
FROM named_places
WHERE name = 'Goose Island';
+--enable_view_protocol
+
--echo # Conformance Item T21
SELECT GLength(centerline)
FROM road_segments
@@ -1253,11 +1272,15 @@ SELECT Area(shores)
FROM ponds
WHERE fid = 120;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--echo # Conformance Item T37
SELECT ST_Equals(boundary,
PolyFromText('POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )',1))
FROM named_places
WHERE name = 'Goose Island';
+--enable_view_protocol
--echo # Conformance Item T38
SELECT ST_Disjoint(centerlines, boundary)
@@ -1289,12 +1312,17 @@ FROM road_segments, divided_routes
WHERE road_segments.fid = 102
AND divided_routes.name = 'Route 75';
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--echo # Conformance Item T43
SELECT ST_Intersects(road_segments.centerline, divided_routes.centerlines)
FROM road_segments, divided_routes
WHERE road_segments.fid = 102
AND divided_routes.name = 'Route 75';
+--enable_view_protocol
+
--echo # Conformance Item T44
SELECT ST_Contains(forests.boundary, named_places.boundary)
FROM forests, named_places
@@ -1354,6 +1382,8 @@ USE test;
--echo # BUG #1043845 st_distance() results are incorrect depending on variable order
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
select st_distance(geomfromtext('LINESTRING(-95.9673005697771 36.13509598461,
-95.9673057475387 36.1344478941074,
-95.9673063519371 36.134484524621,
@@ -1365,6 +1395,8 @@ select st_distance(geomfromtext('point(-95.96269500000000000000 36.1418183333333
-95.9673063519371 36.134484524621,
-95.9673049102515 36.1343976584193) ')) ;
+--enable_view_protocol
+
--echo #
--echo # MDEV-4310 geometry function equals hangs forever.
--echo #
@@ -1425,6 +1457,8 @@ SELECT ASTEXT(0x0100000000030000000100000000000010);
--echo #should not crash
SELECT ENVELOPE(0x0100000000030000000100000000000010);
+#enable after fix MDEV-27871
+--disable_view_protocol
--echo #should not crash
SELECT
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
@@ -1432,6 +1466,7 @@ SELECT
--echo #should not crash
SELECT
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
+--enable_view_protocol
--echo #
--echo # MDEV-3819 missing constraints for spatial column types
@@ -1445,7 +1480,10 @@ drop table t1;
#
# MDEV-7516 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int)
#
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100));
+--enable_view_protocol
#
# MDEV-7779 View definition changes upon creation
@@ -1541,12 +1579,15 @@ drop table t1;
--echo # MDEV-7510 GIS: IsRing returns false for a primitive triangle.
--echo #
select ST_IsRing(ST_LineFromText('LINESTRING(0 0,0 10,10 10,0 0)'));
+#enable after fix MDEV-27871
+--disable_view_protocol
select ST_IsRing(ST_LineFromText('LINESTRING(0 0,0 10,10 10,-10 -10, 0 -10, 0 0)'));
--echo #
--echo # MDEV-7514 GIS: PointOnSurface returns NULL instead of the point.
--echo #
SELECT ST_GEOMETRYTYPE(ST_PointOnSurface(ST_PolyFromText('POLYGON((-70.916 42.1002,-70.9468 42.0946,-70.9754 42.0875,-70.9749 42.0879,-70.9759 42.0897,-70.916 42.1002))')));
+--enable_view_protocol
--echo #
--echo # MDEV-7529 GIS: ST_Relate returns unexpected results for POINT relations
@@ -2402,6 +2443,7 @@ DROP TABLE t1;
--enable_metadata
--disable_ps_protocol
+--disable_view_protocol
SELECT
ST_ISSIMPLE(POINT(1,1)),
ST_ISRING(POINT(1,1)),
@@ -2411,6 +2453,7 @@ SELECT
ST_NUMINTERIORRINGS(POINT(1,1)),
ST_NUMPOINTS(POINT(1,1)),
ST_SRID(POINT(1,1));
+ --enable_view_protocol
--enable_ps_protocol
--disable_metadata
@@ -3204,6 +3247,7 @@ CREATE TABLE t1 (
g GEOMETRY
) CHARACTER SET utf8;
+--disable_view_protocol
--enable_metadata
SELECT * FROM t1;
@@ -3307,6 +3351,7 @@ SELECT
FROM t1;
--disable_metadata
+--enable_view_protocol
DROP TABLE t1;
--echo #
diff --git a/mysql-test/main/grant4.test b/mysql-test/main/grant4.test
index 65e8f78b467..cda1c5fb281 100644
--- a/mysql-test/main/grant4.test
+++ b/mysql-test/main/grant4.test
@@ -1,5 +1,7 @@
--source include/not_embedded.inc
+--disable_service_connection
+
# Setup database, tables and user accounts
--disable_warnings
drop database if exists mysqltest_db1;
@@ -268,3 +270,5 @@ create user foo4 identified via mysql_old_password using '1111111111111111111111
set GLOBAL sql_mode=default;
--echo End of 10.1 tests
+
+--enable_service_connection
diff --git a/mysql-test/main/grant_4332.test b/mysql-test/main/grant_4332.test
index 2e46e90d817..8ee42e0f6e0 100644
--- a/mysql-test/main/grant_4332.test
+++ b/mysql-test/main/grant_4332.test
@@ -20,7 +20,9 @@ alter table mysql.event modify definer char(77) collate utf8_bin not null defaul
flush privileges;
--enable_metadata
+--disable_view_protocol
select user();
+--enable_view_protocol
--disable_metadata
--error ER_WRONG_STRING_LENGTH
@@ -40,7 +42,9 @@ alter table mysql.event modify definer varchar(384) collate utf8_bin not null de
flush privileges;
--enable_metadata
+--disable_view_protocol
select user();
+--enable_view_protocol
--disable_metadata
set global sql_mode=default;
diff --git a/mysql-test/main/grant_kill.test b/mysql-test/main/grant_kill.test
index b29dfb32917..75a25743dc9 100644
--- a/mysql-test/main/grant_kill.test
+++ b/mysql-test/main/grant_kill.test
@@ -7,6 +7,7 @@
--echo #
--echo # MDEV-21743 Split up SUPER privilege to smaller privileges
--echo #
+--disable_service_connection
--let $count_sessions=1
@@ -83,6 +84,8 @@ let $wait_condition=
DROP USER foo@localhost;
DROP USER bar@localhost;
+--enable_service_connection
+
--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test
index 97209b50cda..357959d4071 100644
--- a/mysql-test/main/group_by.test
+++ b/mysql-test/main/group_by.test
@@ -90,6 +90,7 @@ drop table t1;
# Problem with GROUP BY + ORDER BY when no match
# Tested with locking
#
+--disable_service_connection
CREATE TABLE t1 (
cid mediumint(9) NOT NULL auto_increment,
@@ -123,6 +124,7 @@ drop table t2;
unlock tables;
drop table t1;
+--enable_service_connection
#
# Test of group by bug in bugzilla
#
@@ -278,6 +280,7 @@ drop table t1;
# Compare with hash keys
+--disable_view_protocol
CREATE TABLE t1 (a char(1));
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
flush status;
@@ -303,6 +306,7 @@ show status like 'Created%tables';
--enable_ps_protocol
set tmp_memory_table_size=default;
drop table t1;
+--enable_view_protocol
#
# Test of key >= 256 bytes
@@ -637,12 +641,16 @@ SELECT a FROM t1 GROUP BY 'a';
SELECT a FROM t1 GROUP BY "a";
SELECT a FROM t1 GROUP BY `a`;
+--disable_service_connection
+
set sql_mode=ANSI_QUOTES;
SELECT a FROM t1 GROUP BY "a";
SELECT a FROM t1 GROUP BY 'a';
SELECT a FROM t1 GROUP BY `a`;
set sql_mode='';
+--enable_service_connection
+
SELECT a FROM t1 HAVING 'a' > 1;
SELECT a FROM t1 HAVING "a" > 1;
SELECT a FROM t1 HAVING `a` > 1;
@@ -680,6 +688,9 @@ DROP TABLE t1, t2;
# Bug#11211: Ambiguous column reference in GROUP BY.
#
+#disable --view-prototcol because warnings are dropped
+--disable_view_protocol
+
create table t1 (c1 char(3), c2 char(3));
create table t2 (c3 char(3), c4 char(3));
insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2');
@@ -697,6 +708,8 @@ group by t1.c1;
show warnings;
drop table t1, t2;
+--enable_view_protocol
+
#
# Bug #20466: a view is mixing data when there's a trigger on the table
#
@@ -769,8 +782,13 @@ SELECT 1 FROM t1 as t1_outer GROUP BY a
HAVING (SELECT t1_outer.b FROM t1 AS t1_inner LIMIT 1);
SELECT (SELECT SUM(t1_inner.a) FROM t1 AS t1_inner LIMIT 1)
FROM t1 AS t1_outer GROUP BY t1_outer.b;
+
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT SUM(t1_inner.a) FROM t1 AS t1_inner GROUP BY t1_inner.b LIMIT 1)
FROM t1 AS t1_outer;
+--enable_view_protocol
+
--error ER_WRONG_FIELD_WITH_GROUP
SELECT (SELECT SUM(t1_outer.a) FROM t1 AS t1_inner LIMIT 1)
FROM t1 AS t1_outer GROUP BY t1_outer.b;
@@ -878,6 +896,9 @@ SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a) FROM t2 ORDER BY t2.a);
--error 1140
SELECT t1.a FROM t1 ORDER BY (SELECT t2.a FROM t2 ORDER BY SUM(t2.b) LIMIT 1);
+#enable after fix MDEV-28570
+--disable_view_protocol
+
--error 1140
SELECT t1.a FROM t1
WHERE t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t2.b) LIMIT 1);
@@ -915,6 +936,8 @@ SELECT 1 FROM t1 GROUP BY t1.a
SELECT 1 FROM t1 GROUP BY t1.a
HAVING (SELECT AVG(t1.b + t2.b) FROM t2 ORDER BY t2.a LIMIT 1);
+--enable_view_protocol
+
# Both SUMs are aggregated in the subquery, no mixture:
SELECT t1.a FROM t1
WHERE t1.a = (SELECT t2.a FROM t2 GROUP BY t2.a
@@ -938,6 +961,9 @@ SELECT t1.a, SUM(t1.b) FROM t1
ORDER BY SUM(t2.b + t1.a) LIMIT 1)
GROUP BY t1.a;
+#enable after fix MDEV-28570, MDEV-28571
+--disable_view_protocol
+
SELECT t1.a FROM t1 GROUP BY t1.a
HAVING (1, 1) = (SELECT SUM(t1.a), t1.a FROM t2 LIMIT 1);
@@ -954,6 +980,8 @@ select avg (
from t1 as outr order by count(outr.a) limit 1)) as tt
from t1 as most_outer;
+--enable_view_protocol
+
select (select sum(outr.a + t1.a) from t1 limit 1) as tt from t1 as outr order by outr.a;
SET sql_mode=@save_sql_mode;
@@ -1350,6 +1378,8 @@ DROP TABLE t1;
--echo # Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
--echo # by functions
--echo #
+#createing view adds one new warning
+--disable_view_protocol
set tmp_memory_table_size=0;
CREATE TABLE t1(a INT);
@@ -1361,6 +1391,8 @@ SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<');
DROP TABLE t1;
set tmp_memory_table_size=default;
+--enable_view_protocol
+
--echo #
--echo # MDEV-641 LP:1002108 - Wrong result (or crash) from a query with duplicated field in the group list and a limit clause
--echo # Bug#11761078: 53534: INCORRECT 'SELECT SQL_BIG_RESULT...'
@@ -1621,6 +1653,10 @@ DROP TABLE t1, t2;
# MDEV-736 LP:1004615 - Unexpected warnings "Encountered illegal value '' when converting to DECIMAL" on a query with aggregate functions and GROUP BY
#
+#the view protocol creates
+# an additional util connection and other statistics data
+--disable_view_protocol
+
FLUSH STATUS; # this test case *must* use Aria temp tables
CREATE TABLE t1 (f1 INT, f2 decimal(20,1), f3 blob);
@@ -1630,6 +1666,7 @@ DROP TABLE t1;
--echo the value below *must* be 1
show status like 'Created_tmp_disk_tables';
+--enable_view_protocol
--echo #
--echo # Bug #1002146: Unneeded filesort if usage of join buffer is not allowed
diff --git a/mysql-test/main/handler_read_last.test b/mysql-test/main/handler_read_last.test
index 9104be78952..2f18e302fa0 100644
--- a/mysql-test/main/handler_read_last.test
+++ b/mysql-test/main/handler_read_last.test
@@ -1,3 +1,7 @@
+# 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
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/main/having.test b/mysql-test/main/having.test
index f69f5b8fd19..ce86c99865a 100644
--- a/mysql-test/main/having.test
+++ b/mysql-test/main/having.test
@@ -333,7 +333,9 @@ select count(*) from t1 group by s1 having s1 is null;
# prepared statements prints warnings too early
--disable_ps_protocol
+--disable_view_protocol
select s1*0 as s1 from t1 group by s1 having s1 <> 0;
+--enable_view_protocol
--enable_ps_protocol
# ANSI requires: 3 rows
@@ -376,6 +378,7 @@ drop table t1;
# Bug #15917: unexpected complain for a name in having clause
# when the server is run on Windows or with --lower-case-table-names=1
#
+--disable_service_connection
--disable_warnings
DROP SCHEMA IF EXISTS HU;
@@ -417,6 +420,9 @@ SELECT EMPNUM, GRADE*1000
DROP SCHEMA HU;
USE test;
+
+--enable_service_connection
+
#
# Bug#18739: non-standard HAVING extension was allowed in strict ANSI sql mode.
#
@@ -467,6 +473,9 @@ DROP TABLE t1;
--echo #
--echo # Bug#48916 Server incorrectly processing HAVING clauses with an ORDER BY clause
--echo #
+
+--disable_view_protocol
+
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT, f3 INT);
INSERT INTO t1 VALUES (2,7,9), (4,7,9), (6,2,9), (17,0,9);
@@ -495,6 +504,8 @@ HAVING (table2.f2 = 8);
DROP TABLE t1;
+--enable_view_protocol
+
--echo #
--echo # Bug#52336 Segfault / crash in 5.1 copy_fields (param=0x9872980) at sql_select.cc:15355
--echo #
diff --git a/mysql-test/main/having_cond_pushdown.test b/mysql-test/main/having_cond_pushdown.test
index 8225bdec906..99e4a597f22 100644
--- a/mysql-test/main/having_cond_pushdown.test
+++ b/mysql-test/main/having_cond_pushdown.test
@@ -1451,8 +1451,11 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (i int NOT NULL);
SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL);
+#dublicate warning
+--disable_view_protocol
SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0);
+--enable_view_protocol
DROP TABLE t1;
--echo #
diff --git a/mysql-test/main/implicit_commit.test b/mysql-test/main/implicit_commit.test
index 09f2e2e921e..1b59d65a846 100644
--- a/mysql-test/main/implicit_commit.test
+++ b/mysql-test/main/implicit_commit.test
@@ -1,3 +1,7 @@
+# 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
+
source include/have_innodb.inc;
source include/not_embedded.inc;
source include/have_profiling.inc;
diff --git a/mysql-test/main/information_schema_all_engines.test b/mysql-test/main/information_schema_all_engines.test
index f8d685d2560..9c1d4555b9e 100644
--- a/mysql-test/main/information_schema_all_engines.test
+++ b/mysql-test/main/information_schema_all_engines.test
@@ -2,6 +2,10 @@
# information_schema_db.test whose results depends on which engines are
# available (since these engines inject tables into INFORMATION_SCHEMA).
+# 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
+
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_perfschema.inc
diff --git a/mysql-test/main/information_schema_db.test b/mysql-test/main/information_schema_db.test
index 1dd0f84bc09..e60557a9526 100644
--- a/mysql-test/main/information_schema_db.test
+++ b/mysql-test/main/information_schema_db.test
@@ -31,6 +31,7 @@ show tables;
# database-level privileges (e.g. had only table-level or had no
# privileges at all).
#
+--disable_view_protocol
grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
grant all privileges on `mbase`.* to 'mysqltest_1'@'localhost';
create table t1 (f1 int);
@@ -106,12 +107,14 @@ where table_schema='test' order by table_name;
drop function f1;
drop function f2;
drop view v1, v2;
+--enable_view_protocol
#
# Bug#20543 select on information_schema strange warnings, view, different
# schemas/users
#
#
+--disable_service_connection
create database testdb_1;
create user testdb_1@localhost;
grant all on testdb_1.* to testdb_1@localhost with grant option;
@@ -298,3 +301,4 @@ disconnect foo;
drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
drop user foo@localhost;
drop procedure rootonly;
+--enable_service_connection
diff --git a/mysql-test/main/information_schema_part.test b/mysql-test/main/information_schema_part.test
index 62fba4f53d8..3741de61150 100644
--- a/mysql-test/main/information_schema_part.test
+++ b/mysql-test/main/information_schema_part.test
@@ -129,7 +129,9 @@ drop table t1;
drop table if exists t1;
--enable_warnings
create table t1 (f1 int key) partition by key(f1) partitions 2;
+--disable_view_protocol
select create_options from information_schema.tables where table_schema="test";
+--enable_view_protocol
drop table t1;
--echo #
diff --git a/mysql-test/main/init_file_set_password-7656.test b/mysql-test/main/init_file_set_password-7656.test
index 5e7a24fcf7f..7bca34a0fcf 100644
--- a/mysql-test/main/init_file_set_password-7656.test
+++ b/mysql-test/main/init_file_set_password-7656.test
@@ -2,6 +2,8 @@
# MDEV-7656 init_file option does not allow changing passwords
#
--source include/not_embedded.inc
+#enable view protocol after fix MDEV-29542
+--source include/no_view_protocol.inc
create user foo@localhost;
diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test
index f1cf6658f0b..229677efb4c 100644
--- a/mysql-test/main/innodb_ext_key.test
+++ b/mysql-test/main/innodb_ext_key.test
@@ -1,3 +1,7 @@
+# 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
+
--source include/innodb_prefix_index_cluster_optimization.inc
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
diff --git a/mysql-test/main/invisible_binlog.test b/mysql-test/main/invisible_binlog.test
index 654afcc39c3..11b4be3ab87 100644
--- a/mysql-test/main/invisible_binlog.test
+++ b/mysql-test/main/invisible_binlog.test
@@ -1,5 +1,6 @@
--source include/master-slave.inc
+--disable_service_connection
--connection master
create table t1(a int , b int invisible);
insert into t1 values(1);
@@ -30,3 +31,4 @@ show create table t2;
drop table t1,t2;
--source include/rpl_end.inc
+--enable_service_connection
diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test
index 4b659345db4..b0512078954 100644
--- a/mysql-test/main/join_cache.test
+++ b/mysql-test/main/join_cache.test
@@ -409,6 +409,9 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
EXPLAIN
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
@@ -422,6 +425,8 @@ SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.P
WHERE
Country.Population > 10000000;
+--enable_view_protocol
+
show variables like 'join_buffer_size';
set join_cache_level=4;
show variables like 'join_cache_level';
@@ -463,6 +468,9 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
EXPLAIN
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
@@ -476,6 +484,7 @@ SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.P
WHERE
Country.Population > 10000000;
+--enable_view_protocol
--replace_column 9 #
EXPLAIN
@@ -547,6 +556,9 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
EXPLAIN
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
@@ -560,6 +572,8 @@ SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.P
WHERE
Country.Population > 10000000;
+--enable_view_protocol
+
set join_cache_level=6;
show variables like 'join_cache_level';
@@ -600,6 +614,9 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
EXPLAIN
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
@@ -613,6 +630,8 @@ SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.P
WHERE
Country.Population > 10000000;
+--enable_view_protocol
+
set join_cache_level=7;
show variables like 'join_cache_level';
@@ -653,6 +672,9 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
EXPLAIN
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
@@ -666,6 +688,8 @@ SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.P
WHERE
Country.Population > 10000000;
+--enable_view_protocol
+
set join_cache_level=8;
show variables like 'join_cache_level';
@@ -706,6 +730,9 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
EXPLAIN
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
@@ -719,6 +746,8 @@ SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.P
WHERE
Country.Population > 10000000;
+--enable_view_protocol
+
set join_buffer_size=256;
show variables like 'join_buffer_size';
diff --git a/mysql-test/main/join_nested.test b/mysql-test/main/join_nested.test
index 864218371f4..cc1bd327031 100644
--- a/mysql-test/main/join_nested.test
+++ b/mysql-test/main/join_nested.test
@@ -1314,6 +1314,9 @@ DROP TABLE t1,t2,t3,t4,t5;
--echo # MDEV-7992: Nested left joins + 'not exists' optimization
--echo #
+#view protocol gives different query plan (it doesnt' contain database name)
+--disable_view_protocol
+
CREATE TABLE t1(
K1 INT PRIMARY KEY,
Name VARCHAR(15)
@@ -1379,6 +1382,8 @@ eval EXPLAIN EXTENDED $q2;
DROP VIEW v1;
DROP TABLE t1,t2;
+--enable_view_protocol
+
set optimizer_search_depth= @tmp_mdev621;
--echo #
diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test
index 82c7b265b56..ff74e5280e7 100644
--- a/mysql-test/main/join_outer.test
+++ b/mysql-test/main/join_outer.test
@@ -1368,7 +1368,7 @@ drop table t1,t2,t3,t4;
--echo # Bug#57024: Poor performance when conjunctive condition over the outer
--echo # table is used in the on condition of an outer join
--echo #
-
+--disable_view_protocol
create table t1 (a int);
insert into t1 values (NULL), (NULL), (NULL), (NULL);
insert into t1 select * from t1;
@@ -1409,6 +1409,7 @@ select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10;
show status like "handler_read%";
drop table t1,t2,t3;
+--enable_view_protocol
--echo #
--echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
@@ -1887,6 +1888,9 @@ drop table t1,t2,t3;
--echo # MDEV-11958: LEFT JOIN with stored routine produces incorrect result
--echo #
+#view cannot contains duplicate column name
+--disable_view_protocol
+
CREATE TABLE t (x INT);
INSERT INTO t VALUES(1),(NULL);
CREATE FUNCTION f (val INT, ret INT) RETURNS INT DETERMINISTIC RETURN IFNULL(val, ret);
@@ -1909,6 +1913,7 @@ SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
+--enable_view_protocol
drop function f;
drop table t;
diff --git a/mysql-test/main/key.test b/mysql-test/main/key.test
index 4e3e02c8add..fe7a5f48e2d 100644
--- a/mysql-test/main/key.test
+++ b/mysql-test/main/key.test
@@ -238,7 +238,8 @@ drop table t1;
#
# UNIQUE prefix keys and multi-byte charsets
#
-
+#enable view protocol after fix MDEV-27945
+--disable_view_protocol
create table t1 (c varchar(30) character set utf8, t text character set utf8, unique (c(2)), unique (t(3))) engine=myisam;
show create table t1;
insert t1 values ('cccc', 'tttt'),
@@ -257,6 +258,7 @@ select t from t1 where t='tttt';
select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1;
select t from t1 where t=0xD0B1D0B1212223D0B1D0B1D0B1D0B1;
drop table t1;
+--enable_view_protocol
#
# BUG#6151 - myisam index corruption
diff --git a/mysql-test/main/kill-2.test b/mysql-test/main/kill-2.test
index 3412e75b8d5..6d40e14a700 100644
--- a/mysql-test/main/kill-2.test
+++ b/mysql-test/main/kill-2.test
@@ -6,12 +6,12 @@
# connection does not read() from a socket, but returns control to the
# application. 'mysqltest' does not handle the kill request.
#
-
-- source include/not_embedded.inc
--echo #
--echo # MDEV-6896 kill user command cause MariaDB crash!
--echo #
+--disable_service_connection
create user foo@'127.0.0.1';
@@ -26,3 +26,4 @@ let $wait_condition=
where user = "foo";
--source include/wait_condition.inc
drop user foo@'127.0.0.1';
+--enable_service_connection
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index 7dc57158825..0e567170e5a 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -9,6 +9,9 @@
-- source include/not_embedded.inc
-- source include/have_debug_sync.inc
+
+--disable_service_connection
+
set local sql_mode="";
set global sql_mode="";
@@ -601,3 +604,4 @@ DROP TABLE t1, t2;
--echo #
--error ER_BAD_FIELD_ERROR
kill query id user 'foo';
+--enable_service_connection
diff --git a/mysql-test/main/loaddata.test b/mysql-test/main/loaddata.test
index 8fb1877bbc5..b1a7b323b8b 100644
--- a/mysql-test/main/loaddata.test
+++ b/mysql-test/main/loaddata.test
@@ -155,6 +155,8 @@ select * from t1;
#
# It should not be possible to load from a file outside of vardir
+#enable after fix MDEV-27871
+--disable_view_protocol
--error 1238
set @@secure_file_priv= 0;
@@ -171,6 +173,7 @@ eval select load_file("$MYSQL_TEST_DIR/t/loaddata.test");
# cleanup
drop table t1, t2;
+--enable_view_protocol
#
# Bug#27586: Wrong autoinc value assigned by LOAD DATA in the
@@ -424,11 +427,14 @@ SELECT 'before' AS t, id, val1, hex(val1) FROM t1 UNION
TRUNCATE t2;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SELECT LOAD_FILE("$file");
--remove_file $file
-
+--enable_view_protocol
--echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
@@ -443,11 +449,14 @@ SELECT 'before' AS t, id, val1, hex(val1) FROM t1 UNION
TRUNCATE t2;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SELECT LOAD_FILE("$file");
--remove_file $file
-
+--enable_view_protocol
# 2. with NO_BACKSLASH_ESCAPES off
@@ -468,10 +477,15 @@ TRUNCATE t2;
SET sql_mode = 'NO_BACKSLASH_ESCAPES';
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SELECT LOAD_FILE("$file");
--remove_file $file
+--enable_view_protocol
+
SET sql_mode = '';
@@ -491,10 +505,15 @@ TRUNCATE t2;
SET sql_mode = 'NO_BACKSLASH_ESCAPES';
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SELECT LOAD_FILE("$file");
--remove_file $file
+--enable_view_protocol
+
# clean up
set session sql_mode=@OLD_SQL_MODE;
DROP TABLE t1,t2;
@@ -505,8 +524,12 @@ DROP TABLE t1,t2;
--echo # function on windows
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
+
select load_file(0x0A9FB76C661B409C4BEC88098C5DD71B1072F9691F2E827D7EC8F092B299868A3CE196C04F0FB18CAB4E1557EB72331D812379DE7A75CA21C32E7C722C59E5CC33EF262EF04187B0F0EE756FA984DF2EAD37B1E4ADB064C3C5038F2E3B2D661B1C1150AAEB5425512E14D7506166D92D4533872E662F4B2D1428AAB5CCA72E75AA2EF325E196A5A02E2E8278873C64375845994B0F39BE2FF7B478332A7B0AA5E48877C47B6F513E997848AF8CCB8A899F3393AB35333CF0871E36698193862D486B4B9078B70C0A0A507B8A250F3F876F5A067632D5E65193E4445A1EC3A2C9B4C6F07AC334F0F62BC33357CB502E9B1C19D2398B6972AEC2EF21630F8C9134C4F7DD662D8AD7BDC9E19C46720F334B66C22D4BF32ED275144E20E7669FFCF6FC143667C9F02A577F32960FA9F2371BE1FA90E49CBC69C01531F140556854D588DD0E55E1307D78CA38E975CD999F9AEA604266329EE62BFB5ADDA67F549E211ECFBA906C60063696352ABB82AA782D25B17E872EA587871F450446DB1BAE0123D20404A8F2D2698B371002E986C8FCB969A99FF0E150A2709E2ED7633D02ADA87D5B3C9487D27B2BD9D21E2EC3215DCC3CDCD884371281B95A2E9987AAF82EB499C058D9C3E7DC1B66635F60DB121C72F929622DD47B6B2E69F59FF2AE6B63CC2EC60FFBA20EA50569DBAB5DAEFAEB4F03966C9637AB55662EDD28439155A82D053A5299448EDB2E7BEB0F62889E2F84E6C7F34B3212C9AAC32D521D5AB8480993F1906D5450FAB342A0FA6ED223E178BAC036B81E15783604C32A961EA1EF20BE2EBB93D34ED37BC03142B7583303E4557E48551E4BD7CBDDEA146D5485A5D212C35189F0BD6497E66912D2780A59A53B532E12C0A5ED1EC0445D96E8F2DD825221CFE4A65A87AA21DC8750481B9849DD81694C3357A0ED9B78D608D8EDDE28FAFBEC17844DE5709F41E121838DB55639D77E32A259A416D7013B2EB1259FDE1B498CBB9CAEE1D601DF3C915EA91C69B44E6B72062F5F4B3C73F06F2D5AD185E1692E2E0A01E7DD5133693681C52EE13B2BE42D03BDCF48E4E133CF06662339B778E1C3034F9939A433E157449172F7969ACCE1F5D2F65A4E09E4A5D5611EBEDDDBDB0C0C0A);
+--enable_view_protocol
--echo End of 5.0 tests
diff --git a/mysql-test/main/lock_view.test b/mysql-test/main/lock_view.test
index abb8d317946..ba86f1c4e68 100644
--- a/mysql-test/main/lock_view.test
+++ b/mysql-test/main/lock_view.test
@@ -1,5 +1,8 @@
source include/not_embedded.inc;
source include/have_perfschema.inc;
+
+--disable_service_connection
+
#
# LOCK TABLES and privileges on views
#
@@ -92,3 +95,4 @@ exec $MYSQL_DUMP test v1 -uu1 --compact;
drop view v1;
drop table t1;
drop user u1@localhost;
+--enable_service_connection
diff --git a/mysql-test/main/lowercase_table.test b/mysql-test/main/lowercase_table.test
index 4f92e43f5f7..8d493fff5cd 100644
--- a/mysql-test/main/lowercase_table.test
+++ b/mysql-test/main/lowercase_table.test
@@ -2,6 +2,9 @@
# Test of --lower-case-table-names
#
+#remove this include after fix MDEV-27944
+--source include/no_view_protocol.inc
+
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
create table t4 (id int primary key, Word varchar(40) not null);
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
diff --git a/mysql-test/main/lowercase_table_qcache.test b/mysql-test/main/lowercase_table_qcache.test
index bf24c8e9a1c..b6047a98c74 100644
--- a/mysql-test/main/lowercase_table_qcache.test
+++ b/mysql-test/main/lowercase_table_qcache.test
@@ -2,6 +2,8 @@
#
# Test of query cache with --lower-case-table-names
#
+-- source include/no_view_protocol.inc
+
set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
set GLOBAL query_cache_type=ON;
diff --git a/mysql-test/main/mdev375.test b/mysql-test/main/mdev375.test
index 6fdb35016ca..f489d232be8 100644
--- a/mysql-test/main/mdev375.test
+++ b/mysql-test/main/mdev375.test
@@ -3,6 +3,7 @@
#
--source include/not_embedded.inc
+--disable_service_connection
set @save_log_warnings=@@log_warnings, @save_max_connections=@@max_connections;
SET GLOBAL log_warnings=4;
SET GLOBAL max_connections=10;
@@ -33,3 +34,4 @@ show status like "Threads_connected";
SET GLOBAL log_warnings=@save_log_warnings;
SET GLOBAL max_connections=@save_max_connections;
+--enable_service_connection
diff --git a/mysql-test/main/mdl.test b/mysql-test/main/mdl.test
index f7fac0a062d..13c2caf097e 100644
--- a/mysql-test/main/mdl.test
+++ b/mysql-test/main/mdl.test
@@ -8,7 +8,7 @@
--echo # mdl_ticket->m_type == MDL_SHARED_READ'
--echo # failed in MDL_context::upgrade_shared_lock
--echo #
-
+--disable_service_connection
CREATE TABLE t1(a INT) ENGINE=InnoDB;
CREATE TABLE t3(a INT) ENGINE=myisam;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
@@ -89,3 +89,4 @@ connection default;
disconnect locker;
DROP TABLE t1,t3;
+--enable_service_connection
diff --git a/mysql-test/main/merge_mmap.test b/mysql-test/main/merge_mmap.test
index f3fce257f06..01c3896bd02 100644
--- a/mysql-test/main/merge_mmap.test
+++ b/mysql-test/main/merge_mmap.test
@@ -79,6 +79,7 @@ DROP TABLE m2, m1, t2, t1;
#
# INSERT-SELECT with no TEMPORARY table.
#
+--disable_service_connection
CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
@@ -141,6 +142,7 @@ INSERT INTO m2 SELECT * FROM m1;
SELECT * FROM m2;
UNLOCK TABLES;
DROP TABLE m2, m1, t2, t1;
+--enable_service_connection
--echo End of 6.0 tests
diff --git a/mysql-test/main/metadata.test b/mysql-test/main/metadata.test
index 96189a9750a..eade0e0ff01 100644
--- a/mysql-test/main/metadata.test
+++ b/mysql-test/main/metadata.test
@@ -1,6 +1,8 @@
#
# Test metadata
#
+#View protocol gives slightly different metadata
+--source include/no_view_protocol.inc
--disable_warnings
drop table if exists t1,t2;
diff --git a/mysql-test/main/multi_statement.test b/mysql-test/main/multi_statement.test
index 785aa749f5e..40be11930e9 100644
--- a/mysql-test/main/multi_statement.test
+++ b/mysql-test/main/multi_statement.test
@@ -1,3 +1,6 @@
+# view-protocol doesn't support multi-statements
+-- source include/no_view_protocol.inc
+
# PS doesn't support multi-statements
--disable_ps_protocol
diff --git a/mysql-test/main/multi_update.test b/mysql-test/main/multi_update.test
index 5f4b5fc8ec3..54c64918e03 100644
--- a/mysql-test/main/multi_update.test
+++ b/mysql-test/main/multi_update.test
@@ -144,7 +144,7 @@ drop table t1,t2 ;
#
# Test with locking
#
-
+--disable_service_connection
create table t1 (n int(10) not null primary key, d int(10));
create table t2 (n int(10) not null primary key, d int(10));
insert into t1 values(1,1);
@@ -164,6 +164,7 @@ select * from t1;
select * from t2;
unlock tables;
drop table t1,t2;
+--enable_service_connection
#
# Test safe updates and timestamps
diff --git a/mysql-test/main/myisam-optimize.test b/mysql-test/main/myisam-optimize.test
index 7c1fe4ec1c8..44e38e1e708 100644
--- a/mysql-test/main/myisam-optimize.test
+++ b/mysql-test/main/myisam-optimize.test
@@ -1,6 +1,7 @@
--echo #
--echo # MDEV-8475 stale .TMM file causes Aria engine to stop serving the table
--echo #
+--disable_service_connection
create table t1 (pk int primary key, i int) engine=MyISAM;
insert into t1 values (1,1),(2,2);
--let $datadir=`SELECT @@datadir`
@@ -56,3 +57,4 @@ OPTIMIZE TABLE t1;
# Cleanup
--connection default
DROP TABLE t1;
+--enable_service_connection
diff --git a/mysql-test/main/myisam.test b/mysql-test/main/myisam.test
index 2ae4da671e6..58d094d7d08 100644
--- a/mysql-test/main/myisam.test
+++ b/mysql-test/main/myisam.test
@@ -508,6 +508,7 @@ drop table t1;
# Bug #14400 Join could miss concurrently inserted row
#
# Partial key.
+--disable_service_connection
create table t1 (a int not null, primary key(a));
create table t2 (a int not null, b int not null, primary key(a,b));
insert into t1 values (1),(2),(3),(4),(5),(6);
@@ -539,7 +540,7 @@ SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
UNLOCK TABLES;
DROP TABLE t1,t2;
-
+--enable_service_connection
# End of 4.0 tests
#
diff --git a/mysql-test/main/myisam_optimize.test b/mysql-test/main/myisam_optimize.test
index 5e133aea853..82096f0b4e3 100644
--- a/mysql-test/main/myisam_optimize.test
+++ b/mysql-test/main/myisam_optimize.test
@@ -2,6 +2,7 @@
# test OPTIMIZE and a concurrent SELECT of a MyISAM table
#
source include/have_debug_sync.inc;
+--disable_service_connection
call mtr.add_suppression(" marked as crashed and should be repaired");
@@ -63,3 +64,4 @@ UNLOCK TABLES;
DROP TABLE t1;
--echo # End of 10.0 tests
+--enable_service_connection
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 5d86dacfa02..b6da33340fb 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -147,7 +147,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # MDEV-4332 Increase username length from 16 characters
--echo # MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names
--echo #
-
+--disable_service_connection
connection default;
GRANT SELECT ON mysql.* TO very_long_user_name_number_1;
GRANT SELECT ON mysql.* TO very_long_user_name_number_2;
@@ -170,7 +170,7 @@ SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
SELECT grantor FROM mysql.tables_priv WHERE db = 'mysql' AND table_name = 'user';
DROP USER very_long_user_name_number_1, very_long_user_name_number_2, even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost;
DROP PROCEDURE test.pr;
-
+--enable_service_connection
#
# MDEV-13274 mysql_upgrade fails if dbname+tablename+partioname > 64 chars
#
diff --git a/mysql-test/main/mysqlcheck.test b/mysql-test/main/mysqlcheck.test
index 502c90b0d89..ce4ac7d3be2 100644
--- a/mysql-test/main/mysqlcheck.test
+++ b/mysql-test/main/mysqlcheck.test
@@ -5,6 +5,9 @@ call mtr.add_suppression("Invalid .old.. table or database name");
--source include/have_innodb.inc
--source include/default_charset.inc
+#remove this include after fix MDEV-27873
+--source include/no_view_protocol.inc
+
set @save_character_set_client=@@character_set_client;
set @save_collation_connection=@@collation_connection;
diff --git a/mysql-test/main/no-threads.test b/mysql-test/main/no-threads.test
index a2936abf784..c1a608a57e6 100644
--- a/mysql-test/main/no-threads.test
+++ b/mysql-test/main/no-threads.test
@@ -1,3 +1,7 @@
+# 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
+
--source include/one_thread_per_connection.inc
#
# Test the --thread-handler=no-threads option
diff --git a/mysql-test/main/null.test b/mysql-test/main/null.test
index 4e230f72543..3741ec0f8ea 100644
--- a/mysql-test/main/null.test
+++ b/mysql-test/main/null.test
@@ -7,6 +7,9 @@ drop table if exists t1, t2;
# Testing of NULL in a lot of different places
#
+#enable view protocol after fix MDEV-28535
+--disable_view_protocol
+
select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null;
explain extended select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null;
select 1 | NULL,1 & NULL,1+NULL,1-NULL;
@@ -24,6 +27,8 @@ select inet_ntoa(null),inet_aton(null),inet_aton("122.256"),inet_aton("122.226."
explain extended select inet_ntoa(null),inet_aton(null),inet_aton("122.256"),inet_aton("122.226."),inet_aton("");
select not null is true, not null or true, not null and false, not null <=> null;
+--enable_view_protocol
+
create table t1 (x int);
insert into t1 values (null);
select * from t1 where x != 0;
@@ -1061,7 +1066,14 @@ SELECT NULLIF(COUNT(c1),0) FROM t1;
SELECT CASE WHEN COUNT(c1)=0 THEN NULL ELSE COUNT(c1) END FROM t1;
SELECT NULLIF(COUNT(c1)+0,0) AS c1,NULLIF(CAST(COUNT(c1) AS SIGNED),0) AS c2,NULLIF(CONCAT(COUNT(c1)),0) AS c3 FROM t1;
SELECT NULLIF(COUNT(DISTINCT c1),0) FROM t1;
+
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
+
SELECT CASE WHEN COUNT(DISTINCT c1)=0 THEN NULL ELSE COUNT(DISTINCT c1) END FROM t1;
+
+--enable_view_protocol
+
DROP TABLE t1;
CREATE TABLE t1 (
@@ -1124,12 +1136,17 @@ drop table t1;
#
# MDEV-9641 Assertion `args[0] == args[2] || _current_thd()->lex->context_analysis_only' failed in Item_func_nullif::print(String*, enum_query_type)
#
+
+#it is necessary that the view protocol uses the same connection,
+# not util connection
+--disable_service_connection
set names utf8;
create table t1 (f1 varchar(10));
insert into t1 values ('2015-12-31');
--error ER_DATA_OUT_OF_RANGE
select power( timestamp( nullif( '2002-09-08', f1 ) ), 24 ) from t1;
drop table t1;
+--enable_service_connection
#
# MDEV-9682 Assertion `0' failed in Item_cache_row::illegal_method_call on 2nd execution of PS with NULLIF
diff --git a/mysql-test/main/null_key.test b/mysql-test/main/null_key.test
index a5781cc8524..7eabd6d5dc3 100644
--- a/mysql-test/main/null_key.test
+++ b/mysql-test/main/null_key.test
@@ -235,8 +235,11 @@ EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
FLUSH STATUS ;
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
LEFT JOIN t3 ON t2.b=t3.b;
+
+--disable_view_protocol
SELECT FOUND_ROWS();
SHOW STATUS LIKE "handler_read%";
+--enable_view_protocol
DROP TABLE t1,t2,t3,t4;
# End of 4.1 tests
diff --git a/mysql-test/main/olap.test b/mysql-test/main/olap.test
index 078eacb851b..0c990300b68 100644
--- a/mysql-test/main/olap.test
+++ b/mysql-test/main/olap.test
@@ -214,10 +214,15 @@ SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
GROUP BY a WITH ROLLUP;
+#enable view protocol after fix MDEV-28535
+--disable_view_protocol
+
SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a)
FROM (SELECT 1 a, 2 b UNION SELECT 2,3 UNION SELECT 5,6 ) d
GROUP BY a WITH ROLLUP;
+--enable_view_protocol
+
DROP TABLE t1;
#
@@ -254,6 +259,9 @@ DROP TABLE t1,t2;
# Test for bug #11543: ROLLUP query with a repeated column in GROUP BY
#
+#enable view protocol after fix MDEV-28536
+--disable_view_protocol
+
CREATE TABLE t1 (a INT(10) NOT NULL, b INT(10) NOT NULL);
INSERT INTO t1 VALUES (1, 1);
INSERT INTO t1 VALUES (1, 2);
@@ -262,6 +270,8 @@ SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP;
DROP TABLE t1;
+--enable_view_protocol
+
# Bug #12885(1): derived table specified by a subquery with
# ROLLUP over expressions on not nullable group by attributes
#
@@ -444,12 +454,17 @@ DROP TABLE t;
--echo # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP
--echo #
+#enable view protocol after fix MDEV-28538
+--disable_view_protocol
+
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT GET_LOCK( 'foo', 0 );
SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f WITH ROLLUP;
DROP TABLE t1;
+--enable_view_protocol
+
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT i FROM t1 GROUP BY i WITH ROLLUP
diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test
index b689c80db1e..343c36e0f29 100644
--- a/mysql-test/main/opt_trace.test
+++ b/mysql-test/main/opt_trace.test
@@ -21,6 +21,7 @@ create view v2 as select * from t1 where t1.a=1 group by t1.b;
set optimizer_trace="enabled=on";
--echo # Mergeable views/derived tables
+--disable_view_protocol
select * from v1;
select * from information_schema.OPTIMIZER_TRACE;
select * from (select * from t1 where t1.a=1)q;
@@ -29,7 +30,7 @@ select * from information_schema.OPTIMIZER_TRACE;
--echo # Non-Mergeable views
select * from v2;
select * from information_schema.OPTIMIZER_TRACE;
-
+--enable_view_protocol
drop table t1,t2;
drop view v1,v2;
drop function f1;
@@ -276,6 +277,7 @@ end|
--disable_prepare_warnings
delimiter ;|
+--disable_view_protocol
set optimizer_trace='enabled=on';
select f1(a) from t1;
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
@@ -285,11 +287,12 @@ drop table t1,t2;
drop function f1;
drop function f2;
set optimizer_trace='enabled=off';
+--enable_view_protocol
--echo #
--echo # MDEV-18489: Limit the memory used by the optimizer trace
--echo #
-
+--disable_view_protocol
create table t1 (a int);
insert into t1 values (1),(2);
@@ -308,7 +311,7 @@ select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
drop table t1;
set optimizer_trace='enabled=off';
set @@optimizer_trace_max_mem_size= @save_optimizer_trace_max_mem_size;
-
+--enable_view_protocol
--echo #
--echo # MDEV-18527: Optimizer trace for DELETE query shows table:null
--echo #
@@ -405,6 +408,8 @@ create table t1 ( a int, b int, key a_b(a,b));
insert into t1 select a,a from one_k;
set optimizer_trace='enabled=on';
+#enable after fix MDEV-27871
+--disable_view_protocol
explain select * from t1 force index (a_b) where a=2 and b=4;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
@@ -503,6 +508,7 @@ insert into t1 select date_add(now(), interval a day), date_add(now(), interval
explain format=json select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01';
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
drop table t1, t0, one_k;
+--enable_view_protocol
--echo #
--echo # MDEV-19776: Assertion `to_len >= 8' failed in convert_to_printable with optimizer trace enabled
@@ -532,6 +538,8 @@ set optimizer_trace=1;
--echo # (cost_for_plan is the same as best_access_path.cost for single-table SELECTs
--echo # but for joins using condition selectivity it is not as trivial. So,
--echo # now we are printing it)
+#enable after fix MDEV-27871
+--disable_view_protocol
explain select * from t0 A, one_k B where A.a<5 and B.a<800;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
@@ -541,6 +549,7 @@ set join_cache_level=@tmp_jcl;
explain select * from t0 A, one_k B where A.a=B.b and B.a<800;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
drop table t0, one_k;
+--enable_view_protocol
--echo #
--echo # Assertion `to_len >= 8' failed in convert_to_printable
@@ -551,8 +560,10 @@ insert into t1 values ('foo'), ('bar');
EXPLAIN SELECT * FROM t1 WHERE a= REPEAT('a', 0);
SELECT * FROM t1 WHERE a= REPEAT('a', 0);
+#enable after fix MDEV-27871
+--disable_view_protocol
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
-
+--enable_view_protocol
DROP TABLE t1;
--echo #
@@ -582,7 +593,10 @@ create table t1 (kp1 int, kp2 int, key(kp1, kp2));
insert into t1 values (1,1),(1,5),(5,1),(5,5);
set optimizer_trace=1;
select * from t1 force index(kp1) where (kp1=2 and kp2 >=4);
+#enable after fix MDEV-27871
+--disable_view_protocol
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+--enable_view_protocol
drop table t1;
--echo #
@@ -594,10 +608,13 @@ INSERT INTO t1 SELECT seq, seq from seq_1_to_10;
CREATE TABLE t2(a INT, b INT, key(a));
INSERT INTO t2 SELECT seq, seq from seq_1_to_100;
+#enable after fix MDEV-27871
+--disable_view_protocol
SET OPTIMIZER_TRACE=1;
EXPLAIN SELECT * FROM t1, t2 WHERE t1.a=t2.a ORDER BY t2.b;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
DROP TABLE t1,t2;
+--enable_view_protocol
--echo #
--echo # MDEV-22665: Print ranges in the optimizer trace created for non-indexed columns when
@@ -608,12 +625,15 @@ CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 SELECT seq, seq from seq_1_to_100;
SET optimizer_trace=1;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
+#enable after fix MDEV-27871
+--disable_view_protocol
EXPLAIN EXTENDED SELECT * from t1 WHERE a between 1 and 5 and b <= 5;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
EXPLAIN EXTENDED SELECT * from t1 WHERE a != 5;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
EXPLAIN EXTENDED SELECT * from t1 WHERE b >= 10 and b < 25;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+--enable_view_protocol
drop table t1;
--echo #
@@ -624,7 +644,10 @@ drop table t1;
CREATE TABLE t1( a INT, b INT, PRIMARY KEY( a ) );
SELECT sum(b), row_number() OVER (order by b) FROM t1 WHERE a = 101;
UPDATE t1 SET b=10 WHERE a=1;
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+--enable_view_protocol
DROP TABLE t1;
set optimizer_trace='enabled=off';
@@ -642,11 +665,12 @@ set max_session_mem_used=default;
--echo #
--echo # MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
--echo #
-
+--disable_view_protocol
SET optimizer_trace="enabled=on";
SELECT 'a\0' LIMIT 0;
SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
SET optimizer_trace=DEFAULT;
+--enable_view_protocol
--echo #
--echo # MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object
@@ -668,8 +692,10 @@ set optimizer_trace='enabled=on';
--echo # Test many rows to see output of big cost numbers
--echo #
+--disable_view_protocol
select count(*) from seq_1_to_10000000;
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+--enable_view_protocol
--echo #
--echo # MDEV-22891: Optimizer trace: const tables are not clearly visible
@@ -689,14 +715,20 @@ insert into t3 select a,a from t0;
explain
select * from t1 left join (t2 join t3 on t3.pk=1000) on t2.a=t1.a and t2.pk is null;
+#enable after fix MDEV-27871
+--disable_view_protocol
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.mark_join_nest_as_const'))
from information_schema.optimizer_trace;
+--enable_view_protocol
drop table t0, t1, t2, t3;
--echo #
--echo # MDEV-23767: IN-to-subquery conversion is not visible in optimizer trace
--echo #
+
+#enable after fix MDEV-27871
+--disable_view_protocol
create table t0 (a int);
INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -719,6 +751,7 @@ from information_schema.optimizer_trace;
set in_predicate_conversion_threshold=@tmp;
drop table t0;
+--enable_view_protocol
--echo #
--echo # End of 10.5 tests
diff --git a/mysql-test/main/opt_trace_index_merge.test b/mysql-test/main/opt_trace_index_merge.test
index 73240b6a9e2..85918211184 100644
--- a/mysql-test/main/opt_trace_index_merge.test
+++ b/mysql-test/main/opt_trace_index_merge.test
@@ -119,6 +119,8 @@ insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, -1, -1, 'key1
insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 100, 100, 'key4-key3');
set optimizer_trace='enabled=on';
+#check after fix MDEV-27871
+--disable_view_protocol
--echo # 3-way ROR-intersection
explain select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
@@ -128,6 +130,7 @@ select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) fro
explain select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+--enable_view_protocol
drop table t0,t1;
set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_security.test b/mysql-test/main/opt_trace_security.test
index 9fa49190990..cf45a64d30b 100644
--- a/mysql-test/main/opt_trace_security.test
+++ b/mysql-test/main/opt_trace_security.test
@@ -155,6 +155,7 @@ delimiter ;|
grant execute on function f1 to bar@localhost;
+--disable_view_protocol
connection con_foo;
set optimizer_trace='enabled=on';
select * from db1.t1;
@@ -186,6 +187,7 @@ select f1(a) from db1.t1;
--echo #
select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
set optimizer_trace='enabled=off';
+--enable_view_protocol
connection default;
select current_user();
diff --git a/mysql-test/main/opt_trace_ucs2.test b/mysql-test/main/opt_trace_ucs2.test
index 827dc403d58..1a79ea9780e 100644
--- a/mysql-test/main/opt_trace_ucs2.test
+++ b/mysql-test/main/opt_trace_ucs2.test
@@ -6,5 +6,8 @@ insert into t1 values ('a', 'a');
insert into t1 values ('a', 'a');
set optimizer_trace=1;
explain format=json select * from t1 force index(col1) where col1 >='a';
+#enable after fix MDEV-27871
+--disable_view_protocol
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+--enable_view_protocol
drop table t1;
diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test
index cf1e8cbd0dd..36fde2ffe4b 100644
--- a/mysql-test/main/order_by.test
+++ b/mysql-test/main/order_by.test
@@ -2,6 +2,11 @@
# Testing ORDER BY
#
+# Tests will be skipped for the view protocol because the view protocol creates
+# an additional util connection and other statistics data
+# Check after fix MDEV-27871, possible this include can be removed
+--source include/no_view_protocol.inc
+
call mtr.add_suppression("Sort aborted.*");
--disable_warnings
diff --git a/mysql-test/main/outfile_loaddata.test b/mysql-test/main/outfile_loaddata.test
index 85e26ac7b4e..9d966b1e99d 100644
--- a/mysql-test/main/outfile_loaddata.test
+++ b/mysql-test/main/outfile_loaddata.test
@@ -2,8 +2,12 @@
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
+#enable view protocol after fix MDEV-27871
+-- source include/no_view_protocol.inc
+
--enable_prepare_warnings
+
--echo #
--echo # Bug#31663 FIELDS TERMINATED BY special character
--echo #
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index 6271577c614..523ccac8003 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -408,6 +408,9 @@ select "terminated";$$
select "non terminated, space" $$
select "terminated, space"; $$
select "non terminated, comment" /* comment */$$
+
+#--view-protocol test mode can not parse query
+--disable_view_protocol
select "terminated, comment"; /* comment */$$
# Multi queries can not be used in --ps-protocol test mode
@@ -430,6 +433,7 @@ DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030
$$
--enable_ps_protocol
+--enable_view_protocol
delimiter ;$$
DROP PROCEDURE p26030;
@@ -689,7 +693,12 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
+--enable_view_protocol
+
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
SELECT 1 + INTERVAL(1,0,1,2) + 1;
SELECT INTERVAL(1^1,0,1,2) + 1;
@@ -849,10 +858,13 @@ SELECT 1 FROM t1
WHERE EXISTS(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE);
+#enableafter fix MDEV-29537
+--disable_view_protocol
SELECT 1 FROM t1
UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
FOR UPDATE;
+--enable_view_protocol
--error ER_CANT_USE_OPTION_HERE
SELECT 1 FROM t1
@@ -880,8 +892,10 @@ UNION
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
(SELECT 1 FROM t1 FOR UPDATE) UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
+#enableafter fix MDEV-29537
+--disable_view_protocol
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 FOR UPDATE;
-
+--enable_view_protocol
--echo # "INTO" clause tests
@@ -1181,12 +1195,18 @@ SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NULL);
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NOT NULL);
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+--enable_view_protocol
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NULL) FROM t1;
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NOT NULL) FROM t1;
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+--enable_view_protocol
--error ER_SUBQUERY_NO_1_ROW
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP);
@@ -1222,10 +1242,16 @@ CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (10),(20),(30);
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+--enable_view_protocol
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+--enable_view_protocol
--error ER_SUBQUERY_NO_1_ROW
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP);
@@ -1547,6 +1573,8 @@ DROP PROCEDURE p1;
--echo # MDEV-16697: Fix difference between 32bit/windows and 64bit
--echo # systems in allowed select nest level
--echo #
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
@@ -1557,6 +1585,7 @@ DROP PROCEDURE p1;
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
1
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
+--enable_view_protocol
--echo #
--echo # MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the option_value_no_option_type grammar
@@ -1661,7 +1690,7 @@ SET @@sql_mode=@save_sql_mode;
--echo # MDEV-19540: 10.4 allow lock options with SELECT in brackets
--echo # which previous version do not
--echo #
-
+--disable_service_connection
create table t1 (a int);
(select * from t1) for update;
--error ER_WRONG_USAGE
@@ -1669,11 +1698,13 @@ create table t1 (a int);
(select * from t1 for update);
select * from t1 for update;
drop table t1;
+--enable_service_connection
--echo #
--echo # MDEV-20108: [ERROR] mysqld got signal 11 in
--echo # st_select_lex::add_table_to_list
--echo #
+--disable_service_connection
CREATE TABLE t1 (c1 INT NULL);
CREATE TABLE t2 (c1 INT NULL);
@@ -1683,6 +1714,7 @@ select * from t1;
select * from t2;
SET STATEMENT max_statement_time=900 FOR unlock tables;
drop table t1, t2;
+--enable_service_connection
--echo #
--echo # MDEV-21616: Server crash when using
diff --git a/mysql-test/main/partition_explicit_prune.test b/mysql-test/main/partition_explicit_prune.test
index 4dc3275394f..1be5a71751e 100644
--- a/mysql-test/main/partition_explicit_prune.test
+++ b/mysql-test/main/partition_explicit_prune.test
@@ -8,6 +8,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
--echo #
--echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS
--echo #
+--disable_view_protocol
CREATE TABLE t1 (a int)
ENGINE = InnoDB
PARTITION BY HASH (a) PARTITIONS 2;
@@ -83,7 +84,7 @@ SELECT * FROM v1;
SELECT * FROM t1;
DROP VIEW v1;
DROP TABLE t1;
-
+--enable_service_connection
--echo # Original tests for WL#5217
--echo # Must have InnoDB as engine to get the same statistics results.
@@ -99,7 +100,7 @@ eval $get_handler_status_counts;
eval $get_handler_status_counts;
--echo # OK, seems to add number of variables processed before HANDLER_WRITE
--echo # and number of variables + 1 evaluated in the previous call in RND_NEXT
-
+--disable_service_connection
CREATE TABLE t1
(a INT NOT NULL,
b varchar (64),
@@ -622,7 +623,7 @@ eval $get_handler_status_counts;
SELECT * FROM t3 PARTITION (pNeg);
DROP TABLE t1, t2, t3;
-#
+--enable_view_protocol
--echo # Test from superseeded WL# 2682
# Partition select tests.
#
@@ -846,11 +847,12 @@ DROP TABLE t1;
--echo #
--echo # Test explicit partition selection on a non partitioned temp table
--echo #
+--disable_view_protocol
CREATE TEMPORARY TABLE t1 (a INT);
--error ER_PARTITION_CLAUSE_ON_NONPARTITIONED
SELECT * FROM t1 PARTITION(pNonexisting);
DROP TEMPORARY TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # Test CREATE LIKE does not take PARTITION clause
--echo #
@@ -865,6 +867,7 @@ SET @@default_storage_engine = @old_default_storage_engine;
--echo #
--echo # MDEV-14815 - Server crash or AddressSanitizer errors or valgrind warnings in thr_lock / has_old_lock upon FLUSH TABLES
--echo #
+--disable_service_connection
CREATE TABLE t1 (i INT) ENGINE=MEMORY PARTITION BY RANGE (i) (PARTITION p0 VALUES LESS THAN (4), PARTITION pm VALUES LESS THAN MAXVALUE);
CREATE TABLE t2 (i INT) ENGINE=MEMORY;
LOCK TABLE t1 WRITE, t2 WRITE;
@@ -877,7 +880,7 @@ ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
SELECT * FROM t1 PARTITION (p0);
UNLOCK TABLES;
DROP TABLE t1;
-
+--enable_service_connection
--echo #
--echo # MDEV-18371 Server crashes in ha_innobase::cmp_ref upon UPDATE with PARTITION clause.
--echo #
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test
index 26c7c0783f3..563a750b81b 100644
--- a/mysql-test/main/partition_innodb.test
+++ b/mysql-test/main/partition_innodb.test
@@ -3,6 +3,7 @@
--source include/have_innodb.inc
--source include/default_optimizer_switch.inc
+--disable_service_connection
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
set global default_storage_engine='innodb';
@@ -94,7 +95,7 @@ DROP TABLE t1;
--echo # Bug#54747: Deadlock between REORGANIZE PARTITION and
--echo # SELECT is not detected
--echo #
-
+--disable_view_protocol
CREATE TABLE t1
(user_num BIGINT,
hours SMALLINT,
@@ -140,11 +141,12 @@ COMMIT;
--connection default
DROP TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # Bug#50418: DROP PARTITION does not interact with transactions
--echo #
+--disable_view_protocol
CREATE TABLE t1 (
id INT AUTO_INCREMENT NOT NULL,
name CHAR(50) NOT NULL,
@@ -183,7 +185,7 @@ SELECT * FROM t1;
--echo # No changes.
COMMIT;
DROP TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # Bug#51830: Incorrect partition pruning on range partition (regression)
@@ -582,6 +584,7 @@ DROP TABLE t1;
--echo # Bug#47343: InnoDB fails to clean-up after lock wait timeout on
--echo # REORGANIZE PARTITION
--echo #
+--disable_view_protocol
CREATE TABLE t1 (
a INT,
b DATE NOT NULL,
@@ -616,6 +619,7 @@ connection default;
SELECT * FROM t1;
COMMIT;
DROP TABLE t1;
+--enable_view_protocol
#
# Bug #55146 Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map
@@ -968,6 +972,7 @@ set global default_storage_engine=default;
--echo # Bug#13737949: CRASH IN HA_PARTITION::INDEX_INIT
--echo # Bug#18694052: SERVER CRASH IN HA_PARTITION::INIT_RECORD_PRIORITY_QUEUE
--echo #
+--disable_view_protocol
CREATE TABLE t1
(a INT,
b INT,
@@ -1001,7 +1006,7 @@ SELECT b FROM t1 WHERE b = 0;
SELECT b FROM t1 WHERE b = 0;
--disconnect con1
DROP TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # MDEV-11167: InnoDB: Warning: using a partial-field key prefix
--echo # in search, results in assertion failure or "Can't find record" error
@@ -1144,3 +1149,4 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+--enable_service_connection
diff --git a/mysql-test/main/partition_innodb_plugin.test b/mysql-test/main/partition_innodb_plugin.test
index bd96042c3f4..c24945152b3 100644
--- a/mysql-test/main/partition_innodb_plugin.test
+++ b/mysql-test/main/partition_innodb_plugin.test
@@ -100,6 +100,8 @@ SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed;
#
# Bug#32430 - show engine innodb status causes errors
#
+#change to "disable_service_connection" after fix MDEV-29278
+--disable_view_protocol
SET @save_detect= @@GLOBAL.innodb_deadlock_detect;
SET @save_report= @@GLOBAL.innodb_deadlock_report;
SET GLOBAL innodb_deadlock_detect=ON;
@@ -163,3 +165,4 @@ ROLLBACK;
disconnect con1;
connection default;
DROP TABLE `t``\""e`;
+--enable_view_protocol
diff --git a/mysql-test/main/partition_innodb_semi_consistent.test b/mysql-test/main/partition_innodb_semi_consistent.test
index 7a1dfc36173..c1a516b255f 100644
--- a/mysql-test/main/partition_innodb_semi_consistent.test
+++ b/mysql-test/main/partition_innodb_semi_consistent.test
@@ -1,3 +1,5 @@
+-- source include/no_view_protocol.inc
+
-- source include/have_partition.inc
-- source include/not_embedded.inc
-- source include/have_innodb.inc
diff --git a/mysql-test/main/partition_symlink.test b/mysql-test/main/partition_symlink.test
index 7e09c7d0642..07d653ee4d6 100644
--- a/mysql-test/main/partition_symlink.test
+++ b/mysql-test/main/partition_symlink.test
@@ -1,5 +1,6 @@
# Test that must have symlink. eg. using DATA/INDEX DIR
# (DATA/INDEX DIR requires symlinks)
+
# This test is only useful for MyISAM, since no other engine supports DATA DIR
-- source include/have_partition.inc
-- source include/have_symlink.inc
@@ -15,6 +16,7 @@ DROP DATABASE IF EXISTS mysqltest2;
--echo #
--echo # Test for WL#4445: EXCHANGE PARTITION
--echo #
+--disable_service_connection
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (a INT)
ENGINE = MyISAM
@@ -44,6 +46,7 @@ ALTER TABLE t1 EXCHANGE PARTITION p2 WITH TABLE t2;
SELECT * FROM t1;
SELECT * FROM t2;
DROP TABLE t1, t2;
+--enable_service_connection
# skipped because of bug#52354
#CREATE TABLE t1 LIKE t2;
#ALTER TABLE t1 PARTITION BY LIST (a)
@@ -72,6 +75,7 @@ DROP TABLE t1, t2;
-- echo # Creating two non colliding tables mysqltest2.t1 and test.t1
-- echo # test.t1 have partitions in mysqltest2-directory!
-- echo # user root:
+--disable_service_connection
CREATE USER mysqltest_1@localhost;
CREATE DATABASE mysqltest2;
USE mysqltest2;
@@ -110,6 +114,7 @@ connection default;
SELECT * FROM t1;
DROP TABLE t1;
DROP DATABASE mysqltest2;
+ --enable_service_connection
# The below test shows that a pre-existing partition can not be
# destroyed by a new partition from another table.
# (Remember that a table or partition that uses the DATA/INDEX DIR
diff --git a/mysql-test/main/percona_nonflushing_analyze_debug.test b/mysql-test/main/percona_nonflushing_analyze_debug.test
index 4c9c2dcb768..fdaf7aed6c0 100644
--- a/mysql-test/main/percona_nonflushing_analyze_debug.test
+++ b/mysql-test/main/percona_nonflushing_analyze_debug.test
@@ -1,5 +1,6 @@
--source include/have_debug_sync.inc
--source include/have_innodb.inc
+--source include/no_view_protocol.inc
#set use_stat_tables='preferably_for_queries';
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/main/plugin.test b/mysql-test/main/plugin.test
index 967364a3e03..9151a6e905c 100644
--- a/mysql-test/main/plugin.test
+++ b/mysql-test/main/plugin.test
@@ -256,10 +256,12 @@ select plugin_name from information_schema.plugins where plugin_library like 'ha
#
#
#
+--disable_service_connection
set names utf8;
select convert('adminðŒ†' using utf8);
--error ER_UDF_NO_PATHS
install plugin foo soname 'adminðŒ†';
+--enable_service_connection
--echo # End of 5.5 test
diff --git a/mysql-test/main/plugin_auth_qa.test b/mysql-test/main/plugin_auth_qa.test
index fce72a66702..9919d093591 100644
--- a/mysql-test/main/plugin_auth_qa.test
+++ b/mysql-test/main/plugin_auth_qa.test
@@ -2,6 +2,8 @@
--source include/have_plugin_auth.inc
--source include/not_embedded.inc
+#enable view protocol after fix MDEV-29542
+--source include/no_view_protocol.inc
set sql_mode="";
diff --git a/mysql-test/main/plugin_auth_qa_1.test b/mysql-test/main/plugin_auth_qa_1.test
index c2435a1d800..1c53da59844 100644
--- a/mysql-test/main/plugin_auth_qa_1.test
+++ b/mysql-test/main/plugin_auth_qa_1.test
@@ -2,6 +2,8 @@
--source include/have_plugin_auth.inc
--source include/not_embedded.inc
+#enable view protocol after fix MDEV-29542
+--source include/no_view_protocol.inc
CREATE DATABASE test_user_db;
diff --git a/mysql-test/main/plugin_auth_qa_2.test b/mysql-test/main/plugin_auth_qa_2.test
index 136419e571f..17e627ab773 100644
--- a/mysql-test/main/plugin_auth_qa_2.test
+++ b/mysql-test/main/plugin_auth_qa_2.test
@@ -5,6 +5,8 @@
# by this application and the application checks the values set the the plugin.
--source include/have_plugin_interface.inc
--source include/not_embedded.inc
+#enable view protocol after fix MDEV-29542
+--source include/no_view_protocol.inc
CREATE DATABASE test_user_db;
diff --git a/mysql-test/main/plugin_auth_qa_3.test b/mysql-test/main/plugin_auth_qa_3.test
index 2d8b82e373a..12474eccecd 100644
--- a/mysql-test/main/plugin_auth_qa_3.test
+++ b/mysql-test/main/plugin_auth_qa_3.test
@@ -5,6 +5,8 @@
# by this application and the application checks the values set the the plugin.
--source include/have_plugin_server.inc
--source include/not_embedded.inc
+#enable view protocol after fix MDEV-29542
+--source include/no_view_protocol.inc
CREATE DATABASE test_user_db;
diff --git a/mysql-test/main/pool_of_threads.test b/mysql-test/main/pool_of_threads.test
index 3d581d4605d..36522aaa5e4 100644
--- a/mysql-test/main/pool_of_threads.test
+++ b/mysql-test/main/pool_of_threads.test
@@ -1,3 +1,7 @@
+# Tests will be skipped for the view protocol because the view protocol creates
+# an additional util connection
+-- source include/no_view_protocol.inc
+
# Start with thread_handling=pool-of-threads
# and run a number of tests
diff --git a/mysql-test/main/precedence.test b/mysql-test/main/precedence.test
index cd7cee4f911..b93aea72e65 100644
--- a/mysql-test/main/precedence.test
+++ b/mysql-test/main/precedence.test
@@ -4501,6 +4501,10 @@ create or replace view v1 as select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL union select * from v1;
+# Looks like it is necessary that the view protocol uses the same connection,
+# not util connection
+--disable_service_connection
+
set sql_mode=PIPES_AS_CONCAT;
create or replace view v1 as select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
@@ -4788,4 +4792,6 @@ Select view_definition from information_schema.views where table_schema='test' a
create or replace view v1 as select 2 IS TRUE = 3, 2 IS FALSE = 3, 2 IS UNKNOWN = 3, 2 IS NULL = 3, ISNULL(2) = 1;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+--enable_service_connection
+
drop view v1;
diff --git a/mysql-test/main/processlist.test b/mysql-test/main/processlist.test
index f419f57ea2f..7e60f196f65 100644
--- a/mysql-test/main/processlist.test
+++ b/mysql-test/main/processlist.test
@@ -1,3 +1,5 @@
+-- source include/no_view_protocol.inc
+
#
# MDEV-4578 information_schema.processlist reports incorrect value for Time (2147483647)
#
diff --git a/mysql-test/main/profiling.test b/mysql-test/main/profiling.test
index 912e4f69798..714c68c00c7 100644
--- a/mysql-test/main/profiling.test
+++ b/mysql-test/main/profiling.test
@@ -1,4 +1,5 @@
--source include/have_profiling.inc
+--source include/no_view_protocol.inc
# Verify that the protocol isn't violated if we ask for profiling info
# before profiling has recorded anything.
diff --git a/mysql-test/main/ps_1general.test b/mysql-test/main/ps_1general.test
index b0f408e3bcf..20f2ad019f4 100644
--- a/mysql-test/main/ps_1general.test
+++ b/mysql-test/main/ps_1general.test
@@ -462,7 +462,9 @@ prepare stmt1 from ' handler t1 open ';
prepare stmt3 from ' commit ' ;
prepare stmt3 from ' rollback ' ;
-
+# the view protocol has to use the same connection,
+# not util connection
+--disable_service_connection
## switch the sql_mode
prepare stmt4 from ' SET sql_mode=ansi ';
execute stmt4;
@@ -479,6 +481,7 @@ execute stmt5;
SET sql_mode=ansi;
execute stmt5;
SET sql_mode="";
+--enable_service_connection
prepare stmt1 from ' flush local privileges ' ;
prepare stmt1 from ' reset query cache ' ;
diff --git a/mysql-test/main/ps_ddl.test b/mysql-test/main/ps_ddl.test
index 8d811ec00c0..0378e05f40f 100644
--- a/mysql-test/main/ps_ddl.test
+++ b/mysql-test/main/ps_ddl.test
@@ -1674,6 +1674,8 @@ drop table t1;
deallocate prepare stmt;
create table t1 (a int);
insert into t1 (a) values (1);
+#t2-temporary table, cannot create a temporary view
+--disable_view_protocol
prepare stmt from "create temporary table if not exists t2 as select * from t1";
execute stmt;
drop table t2;
@@ -1700,6 +1702,7 @@ drop table t1;
drop temporary table t2;
drop table t2;
deallocate prepare stmt;
+--enable_view_protocol
create table t1 (a int);
prepare stmt from "create table t2 like t1";
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test
index f8152945396..ea90a893cc5 100644
--- a/mysql-test/main/query_cache.test
+++ b/mysql-test/main/query_cache.test
@@ -1,5 +1,6 @@
-- source include/have_query_cache.inc
-- source include/long_test.inc
+-- source include/no_view_protocol.inc
set @save_query_cache_size=@@query_cache_size;
#
diff --git a/mysql-test/main/query_cache_debug.test b/mysql-test/main/query_cache_debug.test
index af82927245b..883c952f683 100644
--- a/mysql-test/main/query_cache_debug.test
+++ b/mysql-test/main/query_cache_debug.test
@@ -55,6 +55,7 @@ drop table t1;
#
# Bug#41098: Query Cache returns wrong result with concurrent insert
#
+--disable_view_protocol
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
@@ -106,7 +107,7 @@ DROP TABLE t1,t2;
SET GLOBAL concurrent_insert= DEFAULT;
SET GLOBAL query_cache_size= DEFAULT;
SET GLOBAL query_cache_type= DEFAULT;
-
+--enable_view_protocol
--echo #
--echo # Bug43758 Query cache can lock up threads in 'freeing items' state
diff --git a/mysql-test/main/query_cache_innodb.test b/mysql-test/main/query_cache_innodb.test
index 72ae891e331..7ac96220c11 100644
--- a/mysql-test/main/query_cache_innodb.test
+++ b/mysql-test/main/query_cache_innodb.test
@@ -17,7 +17,7 @@ set query_cache_type=1;
create table t1 ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
create table t2 ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references t1(`id`) on delete cascade ) engine=innodb;
-
+--disable_view_protocol
insert into t1 values (1);
insert into t2 values (1,1);
select * from t2;
@@ -26,6 +26,7 @@ show status like "Qcache_queries_in_cache";
delete from t1;
show status like "Qcache_queries_in_cache";
select * from t2;
+--enable_view_protocol
optimize table t2;
select * from t2;
diff --git a/mysql-test/main/query_cache_merge.test b/mysql-test/main/query_cache_merge.test
index 6212ff624e0..9b342d57a8e 100644
--- a/mysql-test/main/query_cache_merge.test
+++ b/mysql-test/main/query_cache_merge.test
@@ -38,6 +38,7 @@ while ($1)
# prepare and execute, and we will get a constant validation
# error. See WL#4165 for details.
#
+--disable_view_protocol
set @save_table_definition_cache= @@global.table_definition_cache;
set @@global.table_definition_cache=512;
create table t00 (a int) engine=MERGE UNION=(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257) INSERT_METHOD=FIRST;
@@ -52,6 +53,7 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t2
SET @@global.query_cache_size=0;
set @@global.table_definition_cache=@save_table_definition_cache;
+--enable_view_protocol
# End of 4.1 tests
@@ -83,8 +85,10 @@ while ($c)
eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str);
SET GLOBAL query_cache_size = 1048576;
FLUSH STATUS;
+--disable_view_protocol
SELECT a FROM t0 WHERE a = 1;
SHOW STATUS LIKE "Qcache_queries_in_cache";
+--enable_view_protocol
let $c= 255;
let $i= 1;
diff --git a/mysql-test/main/query_cache_with_views.test b/mysql-test/main/query_cache_with_views.test
index c55327e3d0a..e472a7dd478 100644
--- a/mysql-test/main/query_cache_with_views.test
+++ b/mysql-test/main/query_cache_with_views.test
@@ -1,4 +1,5 @@
-- source include/have_query_cache.inc
+-- source include/no_view_protocol.inc
#
# QUERY CACHE options for VIEWs
#
diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test
index a785726cb22..54cd5bfa190 100644
--- a/mysql-test/main/range.test
+++ b/mysql-test/main/range.test
@@ -1252,14 +1252,23 @@ SELECT * FROM t1 WHERE a >= '2009:09:23 00:00:00';
--echo # The former may give errors for the truncated values, while the latter
--echo # gives warnings. The purpose of this test is not to interfere, and only
--echo # preserve existing behavior.
+
+
+#view protocol generates additional warning
+--disable_view_protocol
+
SELECT str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20';
SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
str_to_date('2007-20-00', '%Y-%m-%d') <= '';
+--enable_view_protocol
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20';
SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '';
+--enable_view_protocol
SELECT str_to_date('', '%Y-%m-%d');
diff --git a/mysql-test/main/range_vs_index_merge.test b/mysql-test/main/range_vs_index_merge.test
index 670762bcb2f..9a3b49b9ce4 100644
--- a/mysql-test/main/range_vs_index_merge.test
+++ b/mysql-test/main/range_vs_index_merge.test
@@ -692,7 +692,7 @@ DROP INDEX CityName on City;
CREATE INDEX Name ON City(Name);
CREATE INDEX Population ON City(Population);
-
+--disable_view_protocol
--replace_column 9 #
EXPLAIN
SELECT * FROM City
@@ -752,6 +752,7 @@ SELECT * FROM City
AND (Population >= 100000 AND Population < 120000)
ORDER BY Population LIMIT 5;
SHOW STATUS LIKE 'Handler_read_%';
+--enable_view_protocol
set optimizer_switch=@save_optimizer_switch;
diff --git a/mysql-test/main/read_only_innodb.test b/mysql-test/main/read_only_innodb.test
index 9ba3ccaca07..4b00c32b185 100644
--- a/mysql-test/main/read_only_innodb.test
+++ b/mysql-test/main/read_only_innodb.test
@@ -1,6 +1,7 @@
# should work with embedded server after mysqltest is fixed
-- source include/not_embedded.inc
-- source include/have_innodb.inc
+-- source include/no_view_protocol.inc
#
# BUG#11733: COMMITs should not happen if read-only is set
diff --git a/mysql-test/main/reopen_temp_table.test b/mysql-test/main/reopen_temp_table.test
index 2b3ff3bab5e..3d621fbbc56 100644
--- a/mysql-test/main/reopen_temp_table.test
+++ b/mysql-test/main/reopen_temp_table.test
@@ -1,5 +1,9 @@
--source include/have_innodb.inc
+#Temporary table is only available to the current session
+#and the view cannot be created based on the temporary table
+--source include/no_view_protocol.inc
+
--echo #
--echo # MDEV-5535: Cannot reopen temporary table
--echo #
diff --git a/mysql-test/main/repair.test b/mysql-test/main/repair.test
index 435eb99683a..45de1e73500 100644
--- a/mysql-test/main/repair.test
+++ b/mysql-test/main/repair.test
@@ -1,6 +1,7 @@
#
# Test of repair table
#
+
--source include/have_sequence.inc
--source include/default_charset.inc
@@ -235,6 +236,7 @@ drop table t1;
#
# MDEV-11539 test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S
#
+--disable_view_protocol
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
INSERT t1 VALUES (1);
LOCK TABLE t1 WRITE;
@@ -245,7 +247,7 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES;
SELECT * FROM t1;
UNLOCK TABLES;
DROP TABLE t1;
-
+--enable_view_protocol
--echo # End of 10.0 tests
#
diff --git a/mysql-test/main/reset_connection.test b/mysql-test/main/reset_connection.test
index 29a8ff52f89..e6a456fb27d 100644
--- a/mysql-test/main/reset_connection.test
+++ b/mysql-test/main/reset_connection.test
@@ -4,6 +4,7 @@ FLUSH STATUS;
--disable_result_log
--disable_query_log
+--disable_service_connection
let $i = 10;
begin;
@@ -37,4 +38,6 @@ connection latin1_conn;
SELECT IF(@@character_set_client='latin1','OK', 'FAIL') AS RESULT;
--reset_connection
SELECT IF(@@character_set_client='latin1','OK', 'FAIL') AS RESULT;
-disconnect latin1_conn; \ No newline at end of file
+disconnect latin1_conn;
+
+--enable_service_connection
diff --git a/mysql-test/main/row.test b/mysql-test/main/row.test
index d78d61b078a..8fae416063c 100644
--- a/mysql-test/main/row.test
+++ b/mysql-test/main/row.test
@@ -7,9 +7,12 @@ select (1,2,3) IN ((3,2,3), (1,2,3), (1,3,3));
select row(10,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3));
select row(1,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3));
select row(10,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3));
+#view protocol generates additional warning
+--disable_view_protocol
select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'));
select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3));
select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3));
+--enable_view_protocol
select row('a',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3));
select row('b',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3));
select row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3));
@@ -256,8 +259,10 @@ default character set 'latin1';
insert into t1 (a) values('abc');
insert into t2 (c) values('abc');
select * from t1,t2 where (a,b) = (c,d);
-
+#enable after fix MDEV-29542
+--disable_view_protocol
select host,user from mysql.user where (host,user) = ('localhost','test');
+--enable_view_protocol
drop table t1,t2;
--echo #
diff --git a/mysql-test/main/second_frac-9175.test b/mysql-test/main/second_frac-9175.test
index 91baf997459..4cda672b820 100644
--- a/mysql-test/main/second_frac-9175.test
+++ b/mysql-test/main/second_frac-9175.test
@@ -2,8 +2,13 @@
# MDEV-9175 Query parser tansforms MICROSECOND into SECOND_FRAC, which does not work
#
+#enable after fix MDEV-27871
+--disable_view_protocol
+
select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
select * from v1;
drop view v1;
+
+--enable_view_protocol
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index fa1cd2d8f26..7a2b083bdf0 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -1735,7 +1735,9 @@ select count(*) from t2;
select count(*) from t2 where fld1 < 098024;
# PS does correct pre-zero here. MySQL can't do it as it returns a number.
--disable_ps_protocol
+--disable_view_protocol
select min(fld1) from t2 where fld1>= 098024;
+--enable_view_protocol
--enable_ps_protocol
select max(fld1) from t2 where fld1>= 098024;
select count(*) from t3 where price2=76234234;
@@ -1743,7 +1745,9 @@ select count(*) from t3 where companynr=512 and price2=76234234;
explain select min(fld1),max(fld1),count(*) from t2;
# PS does correct pre-zero here. MySQL can't do it as it returns a number.
--disable_ps_protocol
+--disable_view_protocol
select min(fld1),max(fld1),count(*) from t2;
+--enable_view_protocol
--enable_ps_protocol
select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742;
select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78;
@@ -2178,7 +2182,7 @@ drop table t2;
#
# Bug #11745: SELECT ... FROM DUAL with WHERE condition
#
-
+--disable_view_protocol
CREATE TABLE t1 (a int, b int, c int);
INSERT INTO t1
SELECT 50, 3, 3 FROM DUAL
@@ -2197,7 +2201,7 @@ select count(*) from t1 limit 2,3;
select found_rows();
select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
select found_rows();
-
+--enable_view_protocol
DROP TABLE t1;
#
@@ -2493,9 +2497,10 @@ DROP TABLE t1,t2;
#
# Bug #10650
#
-
+#enable after fix MDEV-28535
+--disable_view_protocol
select x'3136' + 0, X'3136' + 0, b'10' + 0, B'10' + 0;
-
+--enable_view_protocol
#
# Bug #11398 Bug in field_conv() results in wrong result of join with index
#
@@ -2614,19 +2619,28 @@ SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
SHOW LOCAL VARIABLES LIKE 'SQL_MODE';
+#enable after fix MDEV-29231
+--disable_view_protocol
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%';
+--enable_view_protocol
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
-- error 1210
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
+#enable after fix MDEV-29231
+--disable_view_protocol
-- error 1210
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '\\';
+--enable_view_protocol
#this gives an error when NO_BACKSLASH_ESCAPES is set
-- error 1210
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE '';
SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c;
SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
+#enable after fix MDEV-29231
+--disable_view_protocol
-- error 1210
SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\n%' ESCAPE '\n';
+--enable_view_protocol
SET @@SQL_MODE=@OLD_SQL_MODE12595;
DROP TABLE BUG_12595;
@@ -3543,7 +3557,8 @@ DROP VIEW v1;
# On DATETIME-like literals with trailing garbage, BETWEEN fudged in a
# DATETIME comparator, while greater/less-than used bin-string comparisons.
# Should correctly be compared as DATE or DATETIME, but throw a warning:
-
+#enable after fix MDEV-27871
+--disable_view_protocol
select str_to_date('2007-10-09','%Y-%m-%d') between '2007/10/01 00:00:00 GMT'
and '2007/10/20 00:00:00 GMT';
select str_to_date('2007-10-09','%Y-%m-%d') > '2007/10/01 00:00:00 GMT-6';
@@ -3586,6 +3601,7 @@ select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20';
+--enable_view_protocol
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
@@ -3597,12 +3613,15 @@ select str_to_date('1','%Y-%m-%d') = '1';
select str_to_date('1','%Y-%m-%d') = '1';
select str_to_date('','%Y-%m-%d') = '';
+#enable after fix MDEV-27871
+--disable_view_protocol
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and NULL;
select str_to_date('2000-01-01','%Y-%m-%d') between NULL and '2001-01-01';
select str_to_date('2000-01-01','%Y-%m-%d') between '2001-01-01' and NULL;
select str_to_date('2000-01-01','%Y-%m-%d') between NULL and '1000-01-01';
select str_to_date('2000-01-01','%Y-%m-%d') between NULL and NULL;
+--enable_view_protocol
#
# Bug #30666: Incorrect order when using range conditions on 2 tables or more
@@ -3712,7 +3731,7 @@ DROP TABLE t1;
#
# Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
#
-
+--disable_view_protocol
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, c INT, KEY(a));
@@ -3726,7 +3745,7 @@ FLUSH STATUS;
SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3;
SHOW STATUS LIKE 'Handler_read%';
DROP TABLE t1, t2;
-
+--enable_view_protocol
#
# Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error
#
diff --git a/mysql-test/main/select_found.test b/mysql-test/main/select_found.test
index 33613697722..4b6bdbb15e1 100644
--- a/mysql-test/main/select_found.test
+++ b/mysql-test/main/select_found.test
@@ -1,6 +1,11 @@
#
# Testing of found_rows()
#
+
+# Tests will be skipped for the view protocol otherwise
+# found_rows() will return an incorrect result.
+-- source include/no_view_protocol.inc
+
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
diff --git a/mysql-test/main/selectivity.test b/mysql-test/main/selectivity.test
index 1d96dc0bf80..97e2ae4f2bd 100644
--- a/mysql-test/main/selectivity.test
+++ b/mysql-test/main/selectivity.test
@@ -848,7 +848,7 @@ create table t2 (c int, d int, key(c), key(d)) engine=myisam;
insert t2 select floor(rand()*1e5/2)*2, floor(rand()*1e5/3)*3 from t1;
analyze table t1,t2;
-
+--disable_view_protocol
set optimizer_use_condition_selectivity=1;
explain extended
select * from t1, t2, t1 as t3
@@ -864,7 +864,7 @@ select * from t1, t2, t1 as t3
--sorted_result
select * from t1, t2, t1 as t3
where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000;
-
+--enable_view_protocol
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1,t2;
diff --git a/mysql-test/main/set_operation_oracle.test b/mysql-test/main/set_operation_oracle.test
index 60fda4a5cb5..52152b83110 100644
--- a/mysql-test/main/set_operation_oracle.test
+++ b/mysql-test/main/set_operation_oracle.test
@@ -28,8 +28,10 @@ insert into t234 values(2);
insert into t234 values(3);
insert into t234 values(4);
-
+#enable after fix MDEV-29553
+--disable_view_protocol
select * from t13 union select * from t234 intersect select * from t12;
+--enable_view_protocol
set SQL_MODE=default;
drop table t1,t2,t3;
@@ -45,6 +47,8 @@ insert into t3 values (1,1),(3,3);
set SQL_MODE=ORACLE;
+#enable after fix MDEV-29553
+--disable_view_protocol
select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
explain extended
select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
@@ -52,6 +56,7 @@ select a,b from t1 union all select c,d from t2 intersect select e,f from t3 uni
select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
explain extended
select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
+--enable_view_protocol
select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
explain extended
diff --git a/mysql-test/main/set_password.test b/mysql-test/main/set_password.test
index ec652a09274..071b2d05cdc 100644
--- a/mysql-test/main/set_password.test
+++ b/mysql-test/main/set_password.test
@@ -4,6 +4,8 @@
# Various combinations of SET PASSWORD and not-empty mysql.user.plugin field
#
--source include/not_embedded.inc
+#enable view protocol after fix MDEV-29542
+--source include/no_view_protocol.inc
--enable_connect_log
diff --git a/mysql-test/main/set_statement.test b/mysql-test/main/set_statement.test
index 0bf9f423dab..aae7cea40d1 100644
--- a/mysql-test/main/set_statement.test
+++ b/mysql-test/main/set_statement.test
@@ -976,6 +976,7 @@ SET STATEMENT keycache1.key_buffer_size=1024 FOR SELECT 1;
#
# MDEV-6940: SET STATEMENT executed after SET GLOBAL does not work
#
+--disable_view_protocol
set @save_general_log=@@global.general_log;
--echo # SET STATEMENT works (OK)
set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
@@ -1036,6 +1037,7 @@ select sql_text from mysql.slow_log where sql_text not like 'set @@long_query_ti
set statement long_query_time=0.01,min_examined_row_limit=50 for select sleep(0.1);
select sql_text from mysql.slow_log where sql_text not like 'set @@long_query_time%';
--echo #---
+--enable_view_protocol
#
# log_slow_verbosity is impossible to check because results are not written
# in TABLE mode
diff --git a/mysql-test/main/show_explain.test b/mysql-test/main/show_explain.test
index 415a892c0ec..b744047a2a1 100644
--- a/mysql-test/main/show_explain.test
+++ b/mysql-test/main/show_explain.test
@@ -1,6 +1,10 @@
#
# Tests for SHOW EXPLAIN FOR functionality
#
+# 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
+
--source include/have_debug.inc
--source include/have_innodb.inc
# Using valgrind can cause 'reap' to fail. See comment below
diff --git a/mysql-test/main/show_profile.test b/mysql-test/main/show_profile.test
index c20b29c40bf..fe923d74a0e 100644
--- a/mysql-test/main/show_profile.test
+++ b/mysql-test/main/show_profile.test
@@ -5,6 +5,10 @@
# that SHOW PROFILES, SHOW PROFILE FOR QUERY and SHOW PROFILE CPU FOR QUERY
# do not cause syntax errors. It also increases code coverage for sql_profile.cc
+# 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
+
--source include/have_profiling.inc
SET profiling = 1;
SELECT 1;
diff --git a/mysql-test/main/shutdown.test b/mysql-test/main/shutdown.test
index 69616f535b2..13b7ac3f672 100644
--- a/mysql-test/main/shutdown.test
+++ b/mysql-test/main/shutdown.test
@@ -1,4 +1,6 @@
--source include/not_embedded.inc
+
+--disable_service_connection
#
# SHUTDOWN statement
#
@@ -36,3 +38,4 @@ drop user user1@localhost;
--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let SEARCH_PATTERN=(mysqld|mariadbd)(\.exe)? \(initiated by: root\[root\] @ localhost \[(::1)?\]\): Normal shutdown
--source include/search_pattern_in_file.inc
+--enable_service_connection
diff --git a/mysql-test/main/shutdown_not_windows.test b/mysql-test/main/shutdown_not_windows.test
index e93867e2227..43063ced494 100644
--- a/mysql-test/main/shutdown_not_windows.test
+++ b/mysql-test/main/shutdown_not_windows.test
@@ -1,6 +1,8 @@
source include/not_windows.inc;
source include/not_embedded.inc;
source include/have_debug.inc;
+-- source include/no_view_protocol.inc
+
--echo #
--echo # MDEV-18353 Shutdown may miss to wait for connection thread
--echo #
diff --git a/mysql-test/main/simultaneous_assignment.test b/mysql-test/main/simultaneous_assignment.test
index a21e33346d6..aea454855f5 100644
--- a/mysql-test/main/simultaneous_assignment.test
+++ b/mysql-test/main/simultaneous_assignment.test
@@ -29,7 +29,7 @@ UPDATE t1, t2
--echo #
--echo # Check standard update
--echo #
-
+--disable_view_protocol
UPDATE t1
SET c1 = c1+1,
c2 = c1+1,
@@ -43,6 +43,7 @@ UPDATE t1
c3 = c2+1;
SELECT * FROM t1;
ROLLBACK;
+--enable_view_protocol
--echo #
--echo # Check update through a single view
@@ -73,7 +74,8 @@ CREATE VIEW v1 (a, b) AS SELECT t1.c1, t2.c1 FROM t1, t2 WHERE t1.c1=t2.c1;
UPDATE v1
SET a = 10,
b = 20;
-
+
+--disable_view_protocol
START TRANSACTION;
UPDATE v1
SET a = 10;
@@ -116,6 +118,7 @@ UPDATE t1
SELECT * FROM t1;
SELECT * FROM t2;
ROLLBACK;
+--enable_view_protocol
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/main/single_delete_update.test b/mysql-test/main/single_delete_update.test
index ec939641ea3..4a4ad5e5a8e 100644
--- a/mysql-test/main/single_delete_update.test
+++ b/mysql-test/main/single_delete_update.test
@@ -2,6 +2,10 @@
# Single table specific update/delete tests (mysql_update and mysql_delete)
#
+# 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
+
--echo #
--echo # Bug #30584: delete with order by and limit clauses does not use
--echo # limit efficiently
diff --git a/mysql-test/main/sp-anchor-type.test b/mysql-test/main/sp-anchor-type.test
index 56136c4bd63..0e24ef900d8 100644
--- a/mysql-test/main/sp-anchor-type.test
+++ b/mysql-test/main/sp-anchor-type.test
@@ -167,6 +167,9 @@ DROP TABLE t1;
--echo #
--echo # Temporary tables shadow real tables for TYPE OF purposes
--echo #
+#view cannot has temporary table in definition
+--disable_view_protocol
+
CREATE TABLE t1 (a VARCHAR(10));
INSERT INTO t1 VALUES ('t1');
CREATE TEMPORARY TABLE t1 (a INT);
@@ -201,6 +204,7 @@ DROP TABLE t2;
DROP PROCEDURE p1;
DROP TABLE t1;
+--enable_view_protocol
--echo #
--echo # "TYPE OF t1.a" searches for "t1" in the current database
diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test
index 9b0213a1f91..8bd70358c9f 100644
--- a/mysql-test/main/sp-error.test
+++ b/mysql-test/main/sp-error.test
@@ -1613,6 +1613,7 @@ drop view v1;
create view v2 as select bug11555_2();
drop view v2;
# But we should hide name of missing implicitly used table when we use view
+--disable_view_protocol
create table t1 (i int);
create view v1 as select bug11555_1();
create view v2 as select bug11555_2();
@@ -1628,6 +1629,7 @@ select * from v3;
# another form of view usage.
create view v4 as select * from v1;
drop view v1, v2, v3, v4;
+--enable_view_protocol
# We also should hide details about broken triggers which are
# invoked for view.
drop function bug11555_1;
diff --git a/mysql-test/main/sp-lock.test b/mysql-test/main/sp-lock.test
index 703c59e8f28..f31a8268231 100644
--- a/mysql-test/main/sp-lock.test
+++ b/mysql-test/main/sp-lock.test
@@ -20,6 +20,9 @@
--echo # then call a DDL operation on a procedure, and then check
--echo # that the savepoint is no longer present.
+# Tests will be skipped for the view protocol
+-- source include/no_view_protocol.inc
+
--disable_warnings
drop table if exists t1;
drop procedure if exists p1;
diff --git a/mysql-test/main/sp-prelocking.test b/mysql-test/main/sp-prelocking.test
index 38cbd5aa110..fd754a9371c 100644
--- a/mysql-test/main/sp-prelocking.test
+++ b/mysql-test/main/sp-prelocking.test
@@ -19,7 +19,7 @@ drop function if exists f3;
--enable_warnings
# BUG#8072
-
+--disable_service_connection
create database mysqltest;
delimiter //;
use mysqltest//
@@ -42,7 +42,7 @@ select database();
drop procedure mysqltest.sp1;
drop database mysqltest;
-
+--enable_service_connection
# BUG#8766
delimiter //;
diff --git a/mysql-test/main/sp-security-anchor-type.test b/mysql-test/main/sp-security-anchor-type.test
index e61d5e38052..1aefa724f67 100644
--- a/mysql-test/main/sp-security-anchor-type.test
+++ b/mysql-test/main/sp-security-anchor-type.test
@@ -89,6 +89,7 @@ DROP PROCEDURE p1;
--echo # DEFINER root, SQL SECURITY INVOKER
--echo #
+--disable_service_connection
connection default;
DELIMITER $$;
CREATE PROCEDURE p1()
@@ -160,7 +161,7 @@ DROP PROCEDURE p1;
--echo # Stored function: Using TYPE OF for with a table that we don't have access to
--echo # DEFINER user1, SQL SECURITY DEFAULT
--echo #
-
+--disable_view_protocol
CREATE TABLE t1 (a INT);
DELIMITER $$;
CREATE FUNCTION f1() RETURNS INT
@@ -197,7 +198,7 @@ connection conn1;
SELECT f1();
DROP FUNCTION f1;
DROP TABLE t1;
-
+--enable_view_protocol
--echo #
--echo # Stored function: Using TYPE OF for with a table that we don't have access to
@@ -269,7 +270,7 @@ INSERT INTO t1 (a) VALUES (10);
SELECT * FROM t1;
DROP TRIGGER tr1;
DROP TABLE t1;
-
+--enable_service_connection
--echo #
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index fd076ee9efe..7cd68179c04 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -1306,6 +1306,8 @@ create function f1() returns int
return (select sum(data) from t1)|
# Let us also test some weird cases where no real tables is used
+# enable after fix MDEV-28535
+--disable_view_protocol
create function f0() returns int
return (select * from (select 100) as r)|
select f0()|
@@ -1313,10 +1315,13 @@ select *, f0() from (select 1) as t|
create view v0 as select f0()|
select * from v0|
select *, f0() from v0|
+--enable_view_protocol
#
# Let us test how well prelocking works with explicit LOCK TABLES.
#
+#use disable/enable_service_connection after fix MDEV-28535
+--disable_service_connection
lock tables t1 read, t1 as t11 read|
# These should work well
select f3()|
@@ -1333,9 +1338,11 @@ select id, f3() from t1|
--error ER_TABLE_NOT_LOCKED
select f4()|
unlock tables|
+--enable_service_connection
# Let us test how LOCK TABLES which implicitly depends on functions
# works
+--disable_service_connection
lock tables v2 read, mysql.proc read|
select * from v2|
select * from v1|
@@ -1345,6 +1352,7 @@ select * from v1, t1|
--error ER_TABLE_NOT_LOCKED
select f4()|
unlock tables|
+--enable_service_connection
# Tests for handling of temporary tables in functions.
#
@@ -1368,6 +1376,7 @@ select f9()|
select f9() from t1 limit 1|
# Function which uses both temporary and permanent tables.
+--disable_view_protocol
create function f10() returns int
begin
drop temporary table if exists t3;
@@ -1380,6 +1389,7 @@ end|
select f10()|
create table t4 as select 1 as id|
select f10()|
+--enable_view_protocol
create function f11() returns int
begin
@@ -5998,6 +6008,7 @@ SHOW CREATE FUNCTION bug16211_f2|
SHOW CREATE FUNCTION mysqltest2.bug16211_f3|
SHOW CREATE FUNCTION mysqltest2.bug16211_f4|
+--disable_service_connection
SELECT dtd_identifier
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"|
@@ -6013,6 +6024,7 @@ WHERE ROUTINE_SCHEMA = "mysqltest2" AND ROUTINE_NAME = "bug16211_f3"|
SELECT dtd_identifier
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = "mysqltest2" AND ROUTINE_NAME = "bug16211_f4"|
+--enable_service_connection
SELECT CHARSET(bug16211_f1())|
SELECT CHARSET(bug16211_f2())|
diff --git a/mysql-test/main/sql_mode.test b/mysql-test/main/sql_mode.test
index 97f5cf42791..b1c5f05e618 100644
--- a/mysql-test/main/sql_mode.test
+++ b/mysql-test/main/sql_mode.test
@@ -152,6 +152,8 @@ order by masks.p, example;
DROP TABLE t1;
+# enable after fix MDEV-29231
+--disable_view_protocol
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
show local variables like 'SQL_MODE';
@@ -193,9 +195,11 @@ from
order by masks.p, example;
DROP TABLE t1;
+--enable_view_protocol
# Bug #6368: Make sure backslashes mixed with doubled quotes are handled
# correctly in NO_BACKSLASH_ESCAPES mode
+--disable_service_connection
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
@@ -203,7 +207,7 @@ SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
SET @@SQL_MODE='';
SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
-
+--enable_service_connection
#
# Bug#6877: MySQL should give an error if the requested table type
# is not available
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test
index 9955908bd60..7488ccb6877 100644
--- a/mysql-test/main/stat_tables.test
+++ b/mysql-test/main/stat_tables.test
@@ -1,3 +1,7 @@
+# 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
+
--source include/have_stat_tables.inc
--source include/have_partition.inc
diff --git a/mysql-test/main/statistics.test b/mysql-test/main/statistics.test
index 1f99aaa33e5..f5840661825 100644
--- a/mysql-test/main/statistics.test
+++ b/mysql-test/main/statistics.test
@@ -594,6 +594,7 @@ set use_stat_tables='preferably';
ANALYZE TABLE Country, City, CountryLanguage;
--enable_result_log
+--disable_view_protocol
--sorted_result
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
@@ -605,6 +606,7 @@ SELECT UPPER(db_name), UPPER(table_name),
SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
+--enable_view_protocol
use test;
@@ -658,8 +660,10 @@ ANALYZE TABLE City;
FLUSH TABLES;
--enable_result_log
+--disable_view_protocol
--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';
--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';
+--enable_view_protocol
set histogram_type='single_prec_hb';
set histogram_size=0;
diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test
index 19c30bd6dc8..8c11517f5d3 100644
--- a/mysql-test/main/subselect.test
+++ b/mysql-test/main/subselect.test
@@ -75,6 +75,8 @@ SELECT ROW(1,2,3) = (SELECT 1,2,3);
SELECT ROW(1,2,3) = (SELECT 1,2,1);
SELECT ROW(1,2,3) < (SELECT 1,2,1);
SELECT ROW(1,2,3) > (SELECT 1,2,1);
+#enable after fix MDEV-28585
+--disable_view_protocol
SELECT ROW(1,2,3) = (SELECT 1,2,NULL);
SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'a');
SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'b');
@@ -82,6 +84,7 @@ SELECT (SELECT 1.5,2,'a') = ROW('1.5b',2,'b');
SELECT (SELECT 'b',2,'a') = ROW(1.5,2,'a');
SELECT (SELECT 1.5,2,'a') = ROW(1.5,'2','a');
SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
+--enable_view_protocol
-- error ER_OPERAND_COLUMNS
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
@@ -119,8 +122,11 @@ set optimizer_switch=@tmp_optimizer_switch;
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a > t1.a) order by 1 desc limit 1);
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a < t1.a) order by 1 desc limit 1);
+#enable afte fix MDEV-27871
+--disable_view_protocol
select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
explain extended select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
+--enable_view_protocol
select * from t3 where exists (select * from t2 where t2.b=t3.a);
select * from t3 where not exists (select * from t2 where t2.b=t3.a);
select * from t3 where a in (select b from t2);
@@ -145,18 +151,25 @@ select * from t3 where a in (select a,b from t2);
select * from t3 where a in (select * from t2);
insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9),(1,10);
# empty set
+
select b,max(a) as ma from t4 group by b having b < (select max(t2.a) from t2 where t2.b=t4.b);
insert into t2 values (2,10);
select b,max(a) as ma from t4 group by b having ma < (select max(t2.a) from t2 where t2.b=t4.b);
delete from t2 where a=2 and b=10;
select b,max(a) as ma from t4 group by b having b >= (select max(t2.a) from t2 where t2.b=t4.b);
create table t5 (a int);
+
+#enable afte fix MDEV-27871
+--disable_view_protocol
+
select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2;
insert into t5 values (5);
select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2;
insert into t5 values (2);
select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2;
explain extended select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2;
+--enable_view_protocol
+
-- error ER_SUBQUERY_NO_1_ROW
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq));
@@ -260,13 +273,19 @@ SELECT * from t2 where topic = any (SELECT topic FROM t2 GROUP BY topic HAVING t
SELECT * from t2 where topic = any (SELECT SUM(topic) FROM t1);
SELECT * from t2 where topic = all (SELECT topic FROM t2 GROUP BY topic);
SELECT * from t2 where topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT *, topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100) from t2;
+--enable_view_protocol
SELECT * from t2 where topic = all (SELECT SUM(topic) FROM t2);
SELECT * from t2 where topic <> any (SELECT SUM(topic) FROM t2);
SELECT * from t2 where topic IN (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000);
SELECT * from t2 where topic = any (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000);
SELECT * from t2 where topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT *, topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000) from t2;
+--enable_view_protocol
drop table t1,t2;
#forumconthardwarefr7
@@ -467,6 +486,8 @@ INSERT INTO t1 values (1),(1);
UPDATE t2 SET id=(SELECT * FROM t1);
drop table t2, t1;
+#enable after fix MDEV-28585
+--disable_view_protocol
#NULL test
create table t1 (a int);
insert into t1 values (1),(2),(3);
@@ -514,6 +535,7 @@ explain extended select (select a+1) from t1;
--disable_prepare_warnings
select (select a+1) from t1;
drop table t1;
+--enable_view_protocol
#
# Null with keys
@@ -933,7 +955,10 @@ create table t3 (a int, b int);
insert into t1 values (0,100),(1,2), (1,3), (2,2), (2,7), (2,-1), (3,10);
insert into t2 values (0,0), (1,1), (2,1), (3,1), (4,1);
insert into t3 values (3,3), (2,2), (1,1);
+#enable after fix MDEV-27871
+--disable_view_protocol
select a,(select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3;
+--enable_view_protocol
drop table t1,t2,t3;
#
@@ -1051,7 +1076,10 @@ CREATE TABLE `t3` (`taskgenid` mediumint(9) NOT NULL auto_increment,`dbid` int(1
INSERT INTO `t3` (`taskgenid`, `dbid`, `taskid`, `mon`, `tues`,`wed`, `thur`, `fri`, `sat`, `sun`, `how_often`, `userid`, `active`) VALUES (1,-1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1);
CREATE TABLE `t4` (`task_id` smallint(6) NOT NULL default '0',`description` varchar(200) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1;
INSERT INTO `t4` (`task_id`, `description`) VALUES (1, 'Daily Check List'),(2, 'Weekly Status');
+#enable after fix MDEV-27871
+--disable_view_protocol
select dbid, name, (date_format(now() , '%Y-%m-%d') - INTERVAL how_often DAY) >= ifnull((SELECT date_format(max(create_date),'%Y-%m-%d') FROM t1 WHERE dbid = b.db_id AND taskid = a.taskgenid), '1950-01-01') from t3 a, t2 b, t4 WHERE dbid = - 1 AND primary_uid = '1' AND t4.task_id = taskid;
+--enable_view_protocol
SELECT dbid, name FROM t3 a, t2 b, t4 WHERE dbid = - 1 AND primary_uid = '1' AND ((date_format(now() , '%Y-%m-%d') - INTERVAL how_often DAY) >= ifnull((SELECT date_format(max(create_date),'%Y-%m-%d') FROM t1 WHERE dbid = b.db_id AND taskid = a.taskgenid), '1950-01-01')) AND t4.task_id = taskid;
drop table t1,t2,t3,t4;
@@ -1203,6 +1231,8 @@ drop table t1;
#
# ref_or_null replacing with ref
#
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
create table t1 (id int not null, text varchar(20) not null default '', primary key (id));
insert into t1 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text11'), (12, 'text12');
select * from t1 where id not in (select id from t1 where id < 8);
@@ -1215,6 +1245,7 @@ insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, '
select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id);
explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id);
drop table t1,t2;
+--enable_view_protocol
#
# Static tables & rund() in subqueries
@@ -1422,12 +1453,14 @@ DROP TABLE t1;
#
# SELECT(EXISTS * ...)optimisation
#
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
create table t1 (a int, b int);
insert into t1 values (1,2),(3,4);
select * from t1 up where exists (select * from t1 where t1.a=up.a);
explain extended select * from t1 up where exists (select * from t1 where t1.a=up.a);
drop table t1;
-
+--enable_view_protocol
#
# Bug#4102 subselect in HAVING
@@ -2365,6 +2398,9 @@ SELECT a, MAX(b), MIN(b) FROM t1 GROUP BY a;
SELECT * FROM t2;
SELECT * FROM t3;
+#enable after fix MDEV-28570
+--disable_view_protocol
+
SELECT a FROM t1 GROUP BY a
HAVING a IN (SELECT c FROM t2 WHERE MAX(b)>20);
SELECT a FROM t1 GROUP BY a
@@ -2429,6 +2465,8 @@ SELECT t1.a, SUM(b) AS sum FROM t1 GROUP BY t1.a
HAVING t1.a IN (SELECT t2.c FROM t2 GROUP BY t2.c
HAVING t2.c+sum > 20);
+--enable_view_protocol
+
DROP TABLE t1,t2,t3;
@@ -2658,6 +2696,10 @@ DROP TABLE t1;
#
# Bug#21540 Subqueries with no from and aggregate functions return
# wrong results
+
+#enable after fix MDEV-27871, MDEV-28573
+--disable_view_protocol
+
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT);
INSERT INTO t2 values (1);
@@ -2685,7 +2727,7 @@ SELECT (
FROM t1 t2
GROUP BY t2.a;
DROP TABLE t1,t2;
-
+--enable_view_protocol
#
# Bug#21727 Correlated subquery that requires filesort:
@@ -2920,6 +2962,8 @@ DROP TABLE t1,t2;
# Bug#27229 GROUP_CONCAT in subselect with COUNT() as an argument
#
+#enable after fix MDEV-28571
+--disable_view_protocol
CREATE TABLE t1 (a int, b int);
CREATE TABLE t2 (m int, n int);
INSERT INTO t1 VALUES (2,2), (2,2), (3,3), (3,3), (3,3), (4,4);
@@ -2934,7 +2978,7 @@ SELECT COUNT(*) c, a,
FROM t1 GROUP BY a;
DROP table t1,t2;
-
+--enable_view_protocol
#
# Bug#27321 Wrong subquery result in a grouping select
@@ -2965,11 +3009,14 @@ SELECT tt.a,
FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test
FROM t1 as tt GROUP BY tt.a;
+#enable after fix MDEV-28571
+--disable_view_protocol
SELECT tt.a, MAX(
(SELECT (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a)
LIMIT 1)
FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1)) as test
FROM t1 as tt GROUP BY tt.a;
+--enable_view_protocol
DROP TABLE t1;
@@ -2987,6 +3034,7 @@ SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a;
SELECT a FROM t1 t0
WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a;
+--disable_service_connection
SET @@sql_mode='ansi';
--error ER_INVALID_GROUP_FUNC_USE
SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a;
@@ -2998,6 +3046,7 @@ SELECT a FROM t1 t0
WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a;
SET @@sql_mode=default;
+--enable_service_connection
DROP TABLE t1;
@@ -3116,11 +3165,14 @@ DROP TABLE t1,t2;
# Bug#27333 subquery grouped for aggregate of outer query / no aggregate
# of subquery
#
+
CREATE TABLE t1 (a INTEGER, b INTEGER);
CREATE TABLE t2 (x INTEGER);
INSERT INTO t1 VALUES (1,11), (2,22), (2,22);
INSERT INTO t2 VALUES (1), (2);
+#enable after fix MDEV-28573
+--disable_view_protocol
# wasn't failing, but should
--error ER_SUBQUERY_NO_1_ROW
SELECT a, COUNT(b), (SELECT COUNT(b) FROM t2) FROM t1 GROUP BY a;
@@ -3130,6 +3182,8 @@ SELECT a, COUNT(b), (SELECT COUNT(b) FROM t2) FROM t1 GROUP BY a;
SELECT a, COUNT(b), (SELECT COUNT(b)+0 FROM t2) FROM t1 GROUP BY a;
SELECT (SELECT SUM(t1.a)/AVG(t2.x) FROM t2) FROM t1;
+--enable_view_protocol
+
DROP TABLE t1,t2;
# second test case from 27333
@@ -3143,6 +3197,8 @@ GROUP BY a1.a;
DROP TABLE t1;
#test cases from 29297
+#enable after fix MDEV-28573
+--disable_view_protocol
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (1),(2);
@@ -3152,6 +3208,7 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=0) FROM t1;
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1;
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
DROP TABLE t1,t2;
+--enable_view_protocol
#
# Bug#31884 Assertion + crash in subquery in the SELECT clause.
@@ -3804,6 +3861,8 @@ SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a;
SELECT a FROM t1 t0
WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a;
+--disable_service_connection
+
SET @@sql_mode='ansi';
--error ER_INVALID_GROUP_FUNC_USE
SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a;
@@ -3815,6 +3874,8 @@ SELECT a FROM t1 t0
WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a;
SET @@sql_mode=default;
+--enable_service_connection
+
DROP TABLE t1;
#
@@ -5349,11 +5410,14 @@ INSERT INTO t2 VALUES (10,7,0), (0,7,0);
CREATE TABLE t3 (a int, b int);
INSERT INTO t3 VALUES (10,7), (0,7);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT SUM(DISTINCT b),
(SELECT t2.a FROM t1 JOIN t2 ON t2.c != 0
WHERE t.a != 0 AND t2.a != 0)
FROM (SELECT * FROM t3) AS t
GROUP BY 2;
+--enable_view_protocol
SELECT SUM(DISTINCT b),
(SELECT t2.a FROM t1,t2 WHERE t.a != 0 or 1=2 LIMIT 1)
@@ -5511,6 +5575,8 @@ INSERT INTO t3 VALUES (1,1),(2,2);
set @old_optimizer_switch = @@session.optimizer_switch;
set @@optimizer_switch='materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=off,subquery_cache=off,semijoin=off';
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FROM t1) FROM t2;
SELECT (SELECT f3a,f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a,f1a FROM t1) FROM t2;
SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) FROM t2;
@@ -5531,6 +5597,7 @@ SELECT (SELECT f3a FROM t3 where f3a > 3) IN (SELECT f1a FROM t1) FROM t2;
SELECT (SELECT f3a,f3a FROM t3 where f3a > 3) IN (SELECT f1a,f1a FROM t1) FROM t2;
SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) FROM t2;
SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1);
+--enable_view_protocol
# other row operation with NULL single row subquery also should work
select (null, null) = (null, null);
@@ -5570,7 +5637,10 @@ INSERT INTO t3 VALUES (4),(5);
SET optimizer_switch='subquery_cache=off';
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT ( SELECT b FROM t2 WHERE b = a OR EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1;
+--enable_view_protocol
# This query just for example, it should return the same as above (1 and NULL)
SELECT ( SELECT b FROM t2 WHERE b = a OR b * 0) FROM t1;
@@ -5759,6 +5829,8 @@ INSERT INTO t3 VALUES (8),(3);
set @@expensive_subquery_limit= 0;
+#enable after fix MDEV-27871
+--disable_view_protocol
EXPLAIN
SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3)))
FROM t2 alias1, t1 alias2, t1 alias3;
@@ -5784,6 +5856,7 @@ FROM t2 alias1, t1 alias2, t1 alias3;
show status like "subquery_cache%";
show status like '%Handler_read%';
+--enable_view_protocol
drop table t1, t2, t3;
@@ -6037,16 +6110,22 @@ INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (f2 int);
INSERT INTO t2 VALUES (3);
+#enable after fix MDEV-29224
+--disable_view_protocol
SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1;
SELECT ( SELECT MAX(f1) FROM t2 ) FROM v1;
+--enable_view_protocol
INSERT INTO t2 VALUES (4);
+#enable after fix MDEV-28573
+--disable_view_protocol
--error ER_SUBQUERY_NO_1_ROW
SELECT ( SELECT MAX(f1) FROM t2 ) FROM v1;
--error ER_SUBQUERY_NO_1_ROW
SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1;
+--enable_view_protocol
drop view v1;
drop table t1,t2;
@@ -6058,7 +6137,10 @@ CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM;
INSERT t1 VALUES (4),(8);
CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM;
INSERT t2 VALUES (6);
+#view definition cannot contain a subquery in the FROM clause
+--disable_view_protocol
SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
+--enable_view_protocol
--echo #
--echo # Disable this query till MDEV-13399 is resolved
--echo #
diff --git a/mysql-test/main/subselect2.test b/mysql-test/main/subselect2.test
index 3b982b8b7d0..fcc39f73097 100644
--- a/mysql-test/main/subselect2.test
+++ b/mysql-test/main/subselect2.test
@@ -264,6 +264,8 @@ set optimizer_switch=@tmp_mdev567;
--echo # MDEV-4996: degenerate OR formula in WHERE of a subquery
--echo #
+--disable_view_protocol
+
CREATE TABLE t1 (a int, c1 varchar(1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (2,'x'), (8,'d');
@@ -283,6 +285,8 @@ SELECT * FROM t1 WHERE c1 NOT IN (
DROP TABLE t1,t2;
+--enable_view_protocol
+
--echo #
--echo # MDEV-614, also MDEV-536, also LP:1050806:
--echo # different result for a query using subquery between 5.5.25 and 5.5.27
diff --git a/mysql-test/main/subselect3.inc b/mysql-test/main/subselect3.inc
index 8ed1c9ee210..af7b45542bd 100644
--- a/mysql-test/main/subselect3.inc
+++ b/mysql-test/main/subselect3.inc
@@ -689,6 +689,8 @@ SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x),
DROP TABLE t1;
+#enable after fix MDEV-28585
+--disable_view_protocol
--echo # both columns should be same
SELECT ROW(1,2) = (SELECT NULL, NULL), ROW(1,2) IN (SELECT NULL, NULL);
SELECT ROW(1,2) = (SELECT 1, NULL), ROW(1,2) IN (SELECT 1, NULL);
@@ -696,6 +698,7 @@ SELECT ROW(1,2) = (SELECT NULL, 2), ROW(1,2) IN (SELECT NULL, 2);
SELECT ROW(1,2) = (SELECT NULL, 1), ROW(1,2) IN (SELECT NULL, 1);
SELECT ROW(1,2) = (SELECT 1, 1), ROW(1,2) IN (SELECT 1, 1);
SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2);
+--enable_view_protocol
#
# Bug #37362 Crash in do_field_eq
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test
index 0abd901360a..2bbdb54b9c8 100644
--- a/mysql-test/main/subselect4.test
+++ b/mysql-test/main/subselect4.test
@@ -1,5 +1,8 @@
# General purpose bug fix tests go here : subselect.test too large
+#remove this include after fix MDEV-27871, MDEV-27957
+--source include/no_view_protocol.inc
+
--source include/default_optimizer_switch.inc
--disable_warnings
diff --git a/mysql-test/main/subselect_cache.test b/mysql-test/main/subselect_cache.test
index 8fcecf1281b..cf647afb994 100644
--- a/mysql-test/main/subselect_cache.test
+++ b/mysql-test/main/subselect_cache.test
@@ -1,3 +1,7 @@
+# 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
+
--disable_warnings
drop table if exists t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop view if exists v1;
diff --git a/mysql-test/main/subselect_exists2in.test b/mysql-test/main/subselect_exists2in.test
index e70d643138b..8ad89be2b65 100644
--- a/mysql-test/main/subselect_exists2in.test
+++ b/mysql-test/main/subselect_exists2in.test
@@ -270,6 +270,8 @@ INSERT INTO t3 VALUES (4),(5);
SET optimizer_switch='exists_to_in=on,subquery_cache=off,materialization=on,in_to_exists=off,semijoin=off';
+#enable after fix MDEV-27871
+--disable_view_protocol
explain extended
SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1;
SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1;
@@ -325,6 +327,8 @@ set optimizer_switch='exists_to_in=on';
drop table t1,t3;
+--enable_view_protocol
+
--echo #
--echo # MDEV-159 Assertion about not marked for read failed in
--echo # String* Field_varstring::val_str(String*, String*)
@@ -400,6 +404,9 @@ set optimizer_switch='exists_to_in=on';
--echo #
--echo # MDEV-160 Exists2In: Crash in in hp_movelink with subquery_cache=ON
--echo #
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
+
SET optimizer_switch = 'in_to_exists=on,subquery_cache=on,exists_to_in=on';
CREATE TABLE t1 (
@@ -512,6 +519,8 @@ WHERE EXISTS (
SELECT 1 FROM t2 WHERE b = alias1.a AND b > alias2.b
) OR a = 5;
+--enable_view_protocol
+
drop table t1, t2;
set optimizer_switch=default;
set optimizer_switch='exists_to_in=on';
@@ -776,12 +785,16 @@ SELECT STRAIGHT_JOIN sq1.f2
set @optimizer_switch_save=@@optimizer_switch;
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
+
set optimizer_switch='exists_to_in=off';
eval explain extended $q;
eval $q;
set optimizer_switch='exists_to_in=on';
eval explain extended $q;
eval $q;
+--enable_view_protocol
set optimizer_switch= @optimizer_switch_save;
diff --git a/mysql-test/main/subselect_extra.test b/mysql-test/main/subselect_extra.test
index 3651aed9aab..3f2f7b611ff 100644
--- a/mysql-test/main/subselect_extra.test
+++ b/mysql-test/main/subselect_extra.test
@@ -40,6 +40,9 @@ drop tables t1, t2;
--echo #
--echo # Bug #32694: NOT NULL table field in a subquery produces invalid results
--echo #
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
+
create table t1 (id int(10) not null, cur_date datetime not null);
create table t2 (id int(10) not null, cur_date date not null);
insert into t1 (id, cur_date) values (1, '2007-04-25 18:30:22');
@@ -73,6 +76,7 @@ select * from t2
where id in (select id from t2 as x1 where (t2.cur_date is null));
drop table t1,t2;
+--enable_view_protocol
--echo #
--echo # From group_min_max.test
diff --git a/mysql-test/main/subselect_extra_no_semijoin.test b/mysql-test/main/subselect_extra_no_semijoin.test
index 681f92bd8c4..448f52a81e9 100644
--- a/mysql-test/main/subselect_extra_no_semijoin.test
+++ b/mysql-test/main/subselect_extra_no_semijoin.test
@@ -12,6 +12,8 @@ set @optimizer_switch_for_subselect_extra_test=null;
--echo # MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset
--echo #
+--disable_service_connection
+
## Using a separate client connection is easier than restoring state
connect(con1,localhost,root,,);
@@ -36,3 +38,5 @@ drop table t1,t2;
SET GLOBAL slow_query_log=@tmp;
disconnect con1;
connection default;
+
+--enable_service_connection
diff --git a/mysql-test/main/subselect_innodb.test b/mysql-test/main/subselect_innodb.test
index 493a7425ea8..292d72b7bb3 100644
--- a/mysql-test/main/subselect_innodb.test
+++ b/mysql-test/main/subselect_innodb.test
@@ -32,7 +32,10 @@ CREATE INDEX CMFLDRPARNT_IDX ON t1 (PARENTID);
INSERT INTO t1 VALUES("0c9aab05b15048c59bc35c8461507deb", "System", "System", "2003-06-05 16:30:00", "The system content repository folder.", "3", "2003-06-05 16:30:00", "System", "0", NULL, "9c9aab05b15048c59bc35c8461507deb", "1");
INSERT INTO t1 VALUES("2f6161e879db43c1a5b82c21ddc49089", "Default", "System", "2003-06-09 10:52:02", "The default content repository folder.", "3", "2003-06-05 16:30:00", "System", "0", NULL, "03eea05112b845949f3fd03278b5fe43", "1");
INSERT INTO t1 VALUES("c373e9f5ad0791724315444553544200", "AddDocumentTest", "admin", "2003-06-09 10:51:25", "Movie Reviews", "0", "2003-06-09 10:51:25", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT 'c373e9f5ad0791a0dab5444553544200' IN(SELECT t1.FOLDERID FROM t1 WHERE t1.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t1.FOLDERNAME = 'Level1');
+--enable_view_protocol
drop table t1;
#
@@ -69,7 +72,10 @@ CREATE TABLE t2 (
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t3 VALUES (1,1),(2,2),(3,3);
INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT distinct p1.processor_id, (SELECT y.yod_id FROM t1 p2, t2 y WHERE p2.processor_id = p1.processor_id and p2.processor_id = y.processor_id) FROM t1 p1;
+--enable_view_protocol
drop table t2,t1,t3;
#
@@ -207,6 +213,8 @@ CREATE TABLE `t3` (
`t3_id` int NOT NULL
);
INSERT INTO `t3` VALUES (3);
+#enable after fix MDEV-27871
+--disable_view_protocol
select
(SELECT rs.t2_id
FROM t2 rs
@@ -216,6 +224,7 @@ select
WHERE lt.t3_id=a.t3_id)
ORDER BY b DESC LIMIT 1)
from t3 AS a;
+--enable_view_protocol
# repeat above query in SP
--disable_warnings
DROP PROCEDURE IF EXISTS p1;
@@ -631,7 +640,8 @@ set character_set_connection=@save_character_set_connection;
--echo # MDEV-26047: MariaDB server crash at Item_subselect::init_expr_cache_tracker
--echo #
CREATE TABLE t1 (a int) engine=innodb;
-
+#enable abter fix MDEV-27871
+--disable_view_protocol
SELECT 1 IN (
SELECT NULL
FROM t1
@@ -640,6 +650,7 @@ SELECT 1 IN (
GROUP BY
(SELECT NULL from dual WHERE a = 1)
);
+--enable_view_protocol
drop table t1;
--echo # Testcase from MDEV-26164
@@ -661,9 +672,10 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (3),(4);
-
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)));
-
+--enable_view_protocol
drop table t1,t2;
--echo #
diff --git a/mysql-test/main/subselect_mat.test b/mysql-test/main/subselect_mat.test
index fc43d19ae11..cacafb0000f 100644
--- a/mysql-test/main/subselect_mat.test
+++ b/mysql-test/main/subselect_mat.test
@@ -192,6 +192,8 @@ INSERT INTO t2 VALUES (1000,6,2);
set @@optimizer_switch='materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=off,in_to_exists=off';
+#enable after fix MDEV-27871
+--disable_view_protocol
EXPLAIN
SELECT (f1, f2, f3) NOT IN
(SELECT COUNT(DISTINCT f2), f1, f3 FROM t1 GROUP BY f1, f3)
@@ -201,6 +203,8 @@ SELECT (f1, f2, f3) NOT IN
(SELECT COUNT(DISTINCT f2), f1, f3 FROM t1 GROUP BY f1, f3)
FROM t2;
+--enable_view_protocol
+
drop table t1, t2;
--echo #
diff --git a/mysql-test/main/subselect_mat_cost_bugs.test b/mysql-test/main/subselect_mat_cost_bugs.test
index ba1aad06a15..4f837efcdd8 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.test
+++ b/mysql-test/main/subselect_mat_cost_bugs.test
@@ -442,10 +442,13 @@ INSERT INTO t1 VALUES (1,'foo','bar'),(2,'bar','foo');
CREATE TABLE t2 (pk2 INT PRIMARY KEY, a2 VARCHAR(3), KEY(a2)) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1,'abc'),(2,'xyz'),(3,'foo');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT 'qux' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
SELECT 'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
EXPLAIN
SELECT 'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+--enable_view_protocol
DROP TABLE t1,t2;
diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test
index 8d5bbd8ef82..6b343900dca 100644
--- a/mysql-test/main/subselect_sj_mat.test
+++ b/mysql-test/main/subselect_sj_mat.test
@@ -197,6 +197,9 @@ select * from v1m where (c2, b1) in (select distinct c2, b1 from v2m where b1 is
drop view v1, v2, v1m, v2m;
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
+
# nested subqueries, views
explain extended
select * from t1
@@ -330,6 +333,7 @@ explain extended
select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01' from dual);
select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01' from dual);
+--enable_view_protocol
/******************************************************************************
* Subqueries in other uncovered clauses.
@@ -814,6 +818,9 @@ explain extended
select a from t1 group by a having a in (select c from t2 where d >= 20);
select a from t1 group by a having a in (select c from t2 where d >= 20);
+#--view-protocol is disabled because view gives another query plan
+--disable_view_protocol
+
explain extended
select a from t1 group by a
having a in (select c from t2 where d >= some(select e from t3 where max(b)=e));
@@ -824,6 +831,7 @@ select a from t1
where a in (select c from t2 where d >= some(select e from t3 where b=e));
select a from t1
where a in (select c from t2 where d >= some(select e from t3 where b=e));
+--enable_view_protocol
drop table t1, t2, t3;
diff --git a/mysql-test/main/symlink.test b/mysql-test/main/symlink.test
index cf95d4cb938..d5f52e9a60d 100644
--- a/mysql-test/main/symlink.test
+++ b/mysql-test/main/symlink.test
@@ -144,6 +144,9 @@ DROP TABLE t2;
#
# Bug#8706 - temporary table with data directory option fails
#
+#view cannot has temporary table in definition
+--disable_view_protocol
+
connect (session1,localhost,root,,);
connect (session2,localhost,root,,);
@@ -176,6 +179,8 @@ connection default;
select * from t1;
drop table t1;
+--enable_view_protocol
+
--echo End of 4.1 tests
#
diff --git a/mysql-test/main/table_elim.test b/mysql-test/main/table_elim.test
index 8de4743b9fd..e5770877e6f 100644
--- a/mysql-test/main/table_elim.test
+++ b/mysql-test/main/table_elim.test
@@ -614,6 +614,10 @@ SET optimizer_switch=@save_optimizer_switch;
--echo #
--echo # MDEV-7893: table_elimination works wrong with on computed expression and compound unique key
--echo # (just a testcase)
+
+#enable after fix MDEV-28602
+--disable_view_protocol
+
CREATE TABLE t1 (
PostID int(10) unsigned NOT NULL
) DEFAULT CHARSET=utf8;
@@ -641,3 +645,4 @@ LIMIT 1;
DROP TABLE t1,t2;
+--enable_view_protocol
diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test
index 05aca941350..07197329e10 100644
--- a/mysql-test/main/table_value_constr.test
+++ b/mysql-test/main/table_value_constr.test
@@ -1479,6 +1479,9 @@ execute stmt;
execute stmt;
deallocate prepare stmt;
+#enable after fix MDEV-28603
+--disable_view_protocol
+
let $q2=
select (values ((select * from t1 where a > 10))) from t2;
eval $q2;
@@ -1515,6 +1518,8 @@ execute stmt;
execute stmt;
deallocate prepare stmt;
+--enable_view_protocol
+
drop view v1;
drop table t1,t2,t3;
@@ -1586,6 +1591,10 @@ values ((values (2))), ((values ((values (4)))))
union all
values ((values (8))), ((values ((select 4))));
+#A view definition cannot contain a subquery in the FROM clause
+# in the SELECT statement
+--disable_view_protocol
+
select * from (values ((values (2)))) dt;
select * from (values ((values (2)), (5), (select 4))) dt;
@@ -1598,6 +1607,8 @@ select * from (values ((values (2))), ((values (3)))) dt;
select * from (values ((values (2))), ((select 4)), ((values (3)))) dt;
+--enable_view_protocol
+
create table t1 (a int);
insert into t1 values (3), (7), (1);
@@ -1621,10 +1632,16 @@ values ((values ((select (values(2)) from t1 where a=8))));
--error ER_SUBQUERY_NO_1_ROW
values ((select (values(2)) from t1 where a<7));
+#A view definition cannot contain a subquery in the FROM clause
+# in the SELECT statement
+--disable_view_protocol
+
select * from (values ((values ((select a from t1 where a=7))))) dt;
select * from (values ((values ((select (values(2)) from t1 where a=8))))) dt;
+--enable_view_protocol
+
insert into t1(a) values ((values (2))), ((values (3)));
select * from t1;
@@ -1635,6 +1652,10 @@ drop table t1;
--echo # MDEV-25484: Derived table using TVC with LIMIT and ORDER BY
--echo #
+#A view definition cannot contain a subquery in the FROM clause
+# in the SELECT statement
+--disable_view_protocol
+
create table t1 (a int);
insert into t1 values (3), (7), (1);
@@ -1652,6 +1673,8 @@ select * from (values (3),(7),(1) union values (2),(4) order by 1 limit 2) as dt
drop table t1;
+--enable_view_protocol
+
--echo #
--echo # MDEV-23182: Server crashes in
--echo # Item::fix_fields_if_needed / table_value_constr::prepare upon 2nd execution of PS
diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test
index 4f1bb3c5568..6ed5dbd88db 100644
--- a/mysql-test/main/temp_table.test
+++ b/mysql-test/main/temp_table.test
@@ -2,6 +2,9 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
+#View cannot has temporary table in definition
+--source include/no_view_protocol.inc
+
#
# Test of temporary tables
#
diff --git a/mysql-test/main/temp_table_frm.test b/mysql-test/main/temp_table_frm.test
index ddc4ffa575c..47d2fc40d20 100644
--- a/mysql-test/main/temp_table_frm.test
+++ b/mysql-test/main/temp_table_frm.test
@@ -1,7 +1,11 @@
+#View cannot has temporary table in definition
+-- source include/no_view_protocol.inc
+
#
# MDEV-4260 Don't create frm files for temporary tables
#
+
# Ensure we don't overflow the internal heap table size in the join
set @save_use_stat_tables= @@use_stat_tables;
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
diff --git a/mysql-test/main/thread_pool_info.test b/mysql-test/main/thread_pool_info.test
index 84dce94d778..8d4ac01bb1c 100644
--- a/mysql-test/main/thread_pool_info.test
+++ b/mysql-test/main/thread_pool_info.test
@@ -1,6 +1,8 @@
source include/not_embedded.inc;
source include/not_aix.inc;
+-- source include/no_view_protocol.inc
+
let $have_plugin = `SELECT COUNT(*) FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS='ACTIVE' AND PLUGIN_NAME = 'THREAD_POOL_GROUPS'`;
if(!$have_plugin)
{
diff --git a/mysql-test/main/timezone2.test b/mysql-test/main/timezone2.test
index 1feb8916871..20c926a796c 100644
--- a/mysql-test/main/timezone2.test
+++ b/mysql-test/main/timezone2.test
@@ -12,6 +12,9 @@ drop function if exists f1;
#
create table t1 (ts timestamp);
+#enable after fix MDEV-27871
+--disable_view_protocol
+
set time_zone='+00:00';
select unix_timestamp(utc_timestamp())-unix_timestamp(current_timestamp());
insert into t1 (ts) values ('2003-03-30 02:30:00');
@@ -27,6 +30,8 @@ insert into t1 (ts) values ('2003-03-30 02:30:00');
# Here we will get different results
select * from t1;
+--enable_view_protocol
+
drop table t1;
@@ -187,6 +192,9 @@ insert into t1 (tz) values ('MET'), ('UTC');
select tz, convert_tz('2003-12-31 00:00:00',tz,'UTC'), convert_tz('2003-12-31 00:00:00','UTC',tz) from t1 order by tz;
drop table t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
# Parameters to CONVERT_TZ() what should give NULL
select convert_tz('2003-12-31 04:00:00', NULL, 'UTC');
select convert_tz('2003-12-31 04:00:00', 'SomeNotExistingTimeZone', 'UTC');
@@ -194,6 +202,8 @@ select convert_tz('2003-12-31 04:00:00', 'MET', 'SomeNotExistingTimeZone');
select convert_tz('2003-12-31 04:00:00', 'MET', NULL);
select convert_tz( NULL, 'MET', 'UTC');
+--enable_view_protocol
+
#
# Test for bug #4508 "CONVERT_TZ() function with new time zone as param
# crashes server." (Was caused by improperly worked mechanism of time zone
@@ -254,6 +264,7 @@ SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creato
# BUG#19339: CONVERT_TZ(): overly aggressive in locking time_zone_name
# table
#
+--disable_service_connection
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
@@ -272,6 +283,7 @@ UPDATE t1 SET t = CONVERT_TZ(t, 'UTC', 'Europe/Moscow');
UNLOCK TABLES;
DROP TABLE t1;
+--enable_service_connection
--echo #
--echo # Bug #55424: convert_tz crashes when fed invalid data
@@ -302,8 +314,13 @@ SET timestamp=DEFAULT;
--echo #
--echo # MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ
--echo #
+
+#enable after fix MDEV-27871
+--disable_view_protocol
+
SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' );
+--enable_view_protocol
--echo #
--echo # End of 5.3 tests
diff --git a/mysql-test/main/tmp_table_count-7586.test b/mysql-test/main/tmp_table_count-7586.test
index 8bfb0e7c5cf..0629e27f164 100644
--- a/mysql-test/main/tmp_table_count-7586.test
+++ b/mysql-test/main/tmp_table_count-7586.test
@@ -3,6 +3,10 @@
--source include/have_perfschema.inc
--source include/not_embedded.inc
+# 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
+
create table t2 (a int);
insert into t2 values (1),(2),(3);
create view v2 as select a from t2;
diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test
index 32827975e14..f02ac72f35f 100644
--- a/mysql-test/main/trigger.test
+++ b/mysql-test/main/trigger.test
@@ -1082,6 +1082,7 @@ drop trigger t1_ai;
drop table t4;
# Rename between different databases if triggers exist should fail
create database mysqltest;
+--disable_service_connection
use mysqltest;
create table t1 (id int);
create trigger t1_bi before insert on t1 for each row set @a:=new.id;
@@ -1097,6 +1098,7 @@ select @a;
select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test' or event_object_schema = 'mysqltest';
+--enable_service_connection
# There should be no fantom .TRN files
--error ER_TRG_DOES_NOT_EXIST
drop trigger test.t1_bi;
diff --git a/mysql-test/main/truncate.test b/mysql-test/main/truncate.test
index 9e28deacf63..592c234a367 100644
--- a/mysql-test/main/truncate.test
+++ b/mysql-test/main/truncate.test
@@ -69,6 +69,9 @@ drop table t1;
--echo #
--echo # Bug#20667 - Truncate table fails for a write locked table
--echo #
+
+--disable_service_connection
+
CREATE TABLE t1 (c1 INT);
LOCK TABLE t1 WRITE;
INSERT INTO t1 VALUES (1);
@@ -137,6 +140,8 @@ TRUNCATE p1;
SHOW CREATE PROCEDURE p1;
DROP PROCEDURE p1;
+--enable_service_connection
+
--echo #
--echo # Bug#46452 Crash in MDL, HANDLER OPEN + TRUNCATE TABLE
--echo #
diff --git a/mysql-test/main/truncate_notembedded.test b/mysql-test/main/truncate_notembedded.test
index 8b6d2becfa9..bf5606aa51b 100644
--- a/mysql-test/main/truncate_notembedded.test
+++ b/mysql-test/main/truncate_notembedded.test
@@ -5,6 +5,7 @@
--echo # is_bulk_op())' failed upon killed TRUNCATE
--echo #
+--disable_service_connection
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
LOCK TABLE t1 READ;
@@ -29,6 +30,7 @@ TRUNCATE TABLE t1;
--disconnect con1
--connection default
DROP TABLE t1;
+--enable_service_connection
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/main/type_binary.test b/mysql-test/main/type_binary.test
index 9f7a0db66d5..04cdc94e6d8 100644
--- a/mysql-test/main/type_binary.test
+++ b/mysql-test/main/type_binary.test
@@ -135,6 +135,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (a VARCHAR(39));
+--disable_view_protocol
--enable_metadata
SELECT
CAST(a AS BINARY(0)),
@@ -153,4 +154,5 @@ SELECT
CAST(a AS BINARY(16777216))
FROM t1;
--disable_metadata
+--enable_view_protocol
DROP TABLE t1;
diff --git a/mysql-test/main/type_bit.test b/mysql-test/main/type_bit.test
index 2e66c7fb7cd..846fc34e2e9 100644
--- a/mysql-test/main/type_bit.test
+++ b/mysql-test/main/type_bit.test
@@ -234,7 +234,9 @@ drop table t1, t2;
create table t1 (a bit(7));
insert into t1 values (0x60);
--enable_metadata
+--disable_view_protocol
select * from t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -297,10 +299,12 @@ DROP TABLE t1;
CREATE TABLE t1 (b BIT);
INSERT INTO t1 (b) VALUES (1), (0);
--enable_metadata
+--disable_view_protocol
--replace_column 1 #
SELECT DISTINCT b FROM t1;
--replace_column 1 #
SELECT b FROM t1 GROUP BY b;
+--enable_view_protocol
--disable_metadata
DROP TABLE t1;
@@ -456,7 +460,9 @@ SELECT * FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t2;
--enable_metadata
+--disable_view_protocol
SELECT COALESCE(val, 1) FROM t1;
+--enable_view_protocol
--disable_metadata
DROP TABLE t1;
@@ -550,11 +556,13 @@ DELIMITER ;$$
--echo #
CREATE TABLE t1 (b BIT(1));
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
CREATE TABLE t2 AS SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
SHOW CREATE TABLE t2;
DROP TABLE t2;
diff --git a/mysql-test/main/type_bit_innodb.test b/mysql-test/main/type_bit_innodb.test
index 6317bbc3a2d..5fc7c188246 100644
--- a/mysql-test/main/type_bit_innodb.test
+++ b/mysql-test/main/type_bit_innodb.test
@@ -142,7 +142,9 @@ drop table t1;
create table t1 (a bit(7)) engine=innodb;
insert into t1 values (0x60);
--enable_metadata
+--disable_view_protocol
select * from t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test
index 1136062bb88..27d03bd888c 100644
--- a/mysql-test/main/type_date.test
+++ b/mysql-test/main/type_date.test
@@ -78,6 +78,8 @@ drop table t1;
# Test problem with DATE_FORMAT
#
+#enable after fix MDEV-27871
+--disable_view_protocol
CREATE TABLE t1(AFIELD INT);
INSERT INTO t1 VALUES(1);
CREATE TABLE t2(GMT VARCHAR(32));
@@ -89,6 +91,7 @@ SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GM
DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ', t2.GMT))
FROM t1,t2 GROUP BY t1.AFIELD;
drop table t1,t2;
+--enable_view_protocol
#
# Multiple SELECT DATE_FORMAT gave incorrect results (Bug #4036)
@@ -288,7 +291,10 @@ drop table t1;
--echo #
--echo # MDEV-4634 Crash in CONVERT_TZ
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5');
+--enable_view_protocol
--echo #
--echo # MDEV-4804 Date comparing false result
@@ -764,11 +770,13 @@ DROP TABLE t2,t1;
SELECT ROUND(GREATEST('1', CAST('2020-12-12' AS DATE)));
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT GREATEST('1', CAST('2020-12-12' AS DATE));
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
CREATE TABLE t1 (c_date DATE NOT NULL, c_int INT NOT NULL);
CREATE TABLE t2 AS SELECT
diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test
index 4fddf1c1a74..5816977029d 100644
--- a/mysql-test/main/type_datetime.test
+++ b/mysql-test/main/type_datetime.test
@@ -139,10 +139,12 @@ DROP TABLE t1;
# Bug 19491 (CAST DATE AS DECIMAL returns incorrect result
#
SELECT CAST(CAST('2006-08-10' AS DATE) AS DECIMAL(20,6));
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CAST(CAST('2006-08-10 10:11:12' AS DATETIME(6)) AS DECIMAL(20,6));
SELECT CAST(CAST('2006-08-10 10:11:12' AS DATETIME(6)) + INTERVAL 14 MICROSECOND AS DECIMAL(20,6));
SELECT CAST(CAST('10:11:12.098700' AS TIME(6)) AS DECIMAL(20,6));
-
+--disable_view_protocol
#
# Test of storing datetime into date fields
@@ -250,7 +252,10 @@ select least(cast('01-01-01' as date), '01-01-02') + 0;
select greatest(cast('01-01-01' as date), '01-01-02') + 0;
select least(cast('01-01-01' as datetime), '01-01-02') + 0;
select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed);
+#enable after fix MDEV-27871
+--disable_view_protocol
select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(16,2));
+--enable_view_protocol
--disable_warnings
DROP PROCEDURE IF EXISTS test27759 ;
--enable_warnings
@@ -359,6 +364,7 @@ drop table t1;
#
# Bug #32694: NOT NULL table field in a subquery produces invalid results
#
+--disable_view_protocol
create table t1 (id int(10) not null, cur_date datetime not null);
create table t2 (id int(10) not null, cur_date date not null);
insert into t1 (id, cur_date) values (1, '2007-04-25 18:30:22');
@@ -398,6 +404,7 @@ SET optimizer_switch=@save_optimizer_switch;
drop table t1,t2;
+--enable_view_protocol
#
# Bug #37526: asymertic operator <=> in trigger
@@ -438,6 +445,9 @@ create table t1 (da date default '1962-03-32 23:33:34', dt datetime default '196
create table t1 (t time default '916:00:00 a');
set @@sql_mode= @org_mode;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
#
# Bug #42146 - DATETIME fractional seconds parse error
#
@@ -449,11 +459,13 @@ SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.0123450' AS
# once more with feeling (but no warnings)
SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS DATETIME(6)) AS DECIMAL(30,7));
+
#
# Bug #38435 - LONG Microseconds cause MySQL to fail a CAST to DATETIME or DATE
#
# show we truncate microseconds from the right
SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime(6)) AS DECIMAL(30,7));
+--enable_view_protocol
--echo #
--echo # Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
@@ -496,8 +508,10 @@ drop table t1,t2;
--echo #
--echo # MDEV-4634 Crash in CONVERT_TZ
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5');
-
+--enable_view_protocol
--echo #
--echo # MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value
@@ -658,7 +672,10 @@ SELECT CAST(TIME'00:00:00.000001' AS DATETIME(6));
SELECT CAST(CAST('10:20:30' AS TIME) AS DATETIME);
SELECT CAST(CAST('00:00:00.000001' AS TIME(6)) AS DATETIME(6));
SELECT CAST(CAST(TIMESTAMP'0000-00-00 10:20:30' AS TIME) AS DATETIME);
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT CAST(CAST(TIMESTAMP'0000-00-00 00:00:00.000001' AS TIME(6)) AS DATETIME(6));
+--enable_view_protocol
SET old_mode=DEFAULT;
SET sql_mode=DEFAULT;
@@ -683,9 +700,11 @@ SET timestamp=UNIX_TIMESTAMP('2015-01-01 00:00:00');
CREATE TABLE t1 (a TIME);
INSERT INTO t1 VALUES ('00:00:00'),('00:01:00');
--disable_ps_protocol
+--disable_view_protocol
--enable_metadata
SELECT MAX(CAST(a AS DATETIME)) FROM t1;
--disable_metadata
+--enable_view_protocol
--enable_ps_protocol
CREATE TABLE t2 AS SELECT MAX(CAST(a AS DATETIME)) FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test
index 6ff3e257feb..bcbc4cc520e 100644
--- a/mysql-test/main/type_enum.test
+++ b/mysql-test/main/type_enum.test
@@ -110,7 +110,9 @@ insert into t1 values ('Y');
alter table t1 add b set ('Y','N') CHARACTER SET utf8 COLLATE utf8_bin;
alter table t1 add c enum ('Y','N') CHARACTER SET utf8 COLLATE utf8_bin;
--enable_metadata
+--disable_view_protocol
select * from t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
@@ -234,7 +236,9 @@ CREATE TABLE t1 (
) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
--enable_metadata
+--disable_view_protocol
SELECT AVG(f1) FROM t1;
+--enable_view_protocol
--disable_metadata
drop table t1;
diff --git a/mysql-test/main/type_float.test b/mysql-test/main/type_float.test
index a12bf67a426..64483f718bd 100644
--- a/mysql-test/main/type_float.test
+++ b/mysql-test/main/type_float.test
@@ -337,8 +337,11 @@ select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo;
--echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
--echo #
+#enable after fix MDEV-29552
+--disable_view_protocol
SELECT LEFT('a',EXP(50));
SELECT LEFT('a', COALESCE(1e30));
+--enable_view_protocol
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES (1e30);
@@ -629,9 +632,12 @@ DROP TABLE t1, t2;
--echo # MDEV-16872 Add CAST(expr AS FLOAT)
--echo #
+#'float' in the note is written with in lowercase in --view-protocol
+--disable_view_protocol
SELECT CAST(0.671437 AS FLOAT), CONCAT(CAST(0.671437 AS FLOAT));
SELECT CAST(1e40 AS FLOAT), CONCAT(CAST(1e40 AS FLOAT));
SELECT CAST(-1e40 AS FLOAT), CONCAT(CAST(-1e40 AS FLOAT));
+--enable_view_protocol
SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES';
CREATE TABLE t1 (a FLOAT);
diff --git a/mysql-test/main/type_hex_hybrid.test b/mysql-test/main/type_hex_hybrid.test
index 175169fbda4..3f15f06dd12 100644
--- a/mysql-test/main/type_hex_hybrid.test
+++ b/mysql-test/main/type_hex_hybrid.test
@@ -6,6 +6,7 @@
--echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
--echo #
+--disable_service_connection
# It's important for CHARSET('a') and CHARSET(0x61) to have different lengths in this test.
# 'latin1' and 'binary' have same lengths, so using 'utf8'.
SET NAMES utf8;
@@ -15,6 +16,7 @@ SELECT CHARSET('a'),CHARSET(0x61),LENGTH(CHARSET('a'))+a,LENGTH(CHARSET(0x61))+a
SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a;
DROP TABLE t1;
+--enable_service_connection
--echo #
--echo # MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions
diff --git a/mysql-test/main/type_interval.test b/mysql-test/main/type_interval.test
index 15999dc609d..d27700a6725 100644
--- a/mysql-test/main/type_interval.test
+++ b/mysql-test/main/type_interval.test
@@ -19,12 +19,15 @@ INSERT INTO t1 VALUES
('87649416:00:00'),
('3652059 00:00:00');
+#enable after fix MDEV-29525
+--disable_view_protocol
SELECT
EXTRACT(DAY FROM a) AS d,
EXTRACT(HOUR FROM a) AS h,
a,
CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
FROM t1;
+--enable_view_protocol
DROP TABLE t1;
@@ -40,12 +43,15 @@ INSERT INTO t1 VALUES
(876494155959),
(876494160000);
+#enable after fix MDEV-29525
+--disable_view_protocol
SELECT
EXTRACT(DAY FROM a) AS d,
EXTRACT(HOUR FROM a) AS h,
a,
CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
FROM t1;
+--enable_view_protocol
DROP TABLE t1;
diff --git a/mysql-test/main/type_json.test b/mysql-test/main/type_json.test
index bc8716161ac..38754ba6e1e 100644
--- a/mysql-test/main/type_json.test
+++ b/mysql-test/main/type_json.test
@@ -80,12 +80,14 @@ CREATE TABLE t1 (
js2 TEXT CHECK (LENGTH(js2) > 0 AND JSON_VALID(js2)),
js3 TEXT CHECK (LENGTH(js2) > 0 OR JSON_VALID(js2))
) CHARACTER SET utf8;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT * FROM t1;
SELECT js0, JSON_COMPACT(js0), JSON_COMPACT('{}') FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t1;
@@ -95,6 +97,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a JSON);
INSERT INTO t1 VALUES ('{"a":"b"}');
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT a, JSON_COMPACT(a), COALESCE(a) FROM t1;
@@ -102,6 +105,7 @@ SELECT JSON_ARRAYAGG(1), JSON_ARRAYAGG(a) FROM t1;
SELECT JSON_OBJECTAGG('a','b'), JSON_OBJECTAGG('a',a) FROM t1;
--disable_metadata
--disable_ps_protocol
+--enable_view_protocol
DROP TABLE t1;
@@ -109,12 +113,13 @@ DROP TABLE t1;
--echo # MDEV-27018 IF and COALESCE lose "json" property
--echo #
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT json_object('a', (SELECT json_objectagg(b, c) FROM (SELECT 'b','c') d)) AS j FROM DUAL;
--disable_metadata
--disable_ps_protocol
-
+--enable_view_protocol
--echo #
--echo # End of 10.5 tests
diff --git a/mysql-test/main/type_newdecimal.test b/mysql-test/main/type_newdecimal.test
index 873a2ef72c8..d30a2f0067b 100644
--- a/mysql-test/main/type_newdecimal.test
+++ b/mysql-test/main/type_newdecimal.test
@@ -587,8 +587,11 @@ select floor(9.999999999999999999999);
select floor(-9.999999999999999999999);
#-- should return -10
#
+#enable_view_protocol in 10.4
+--disable_view_protocol
select floor(-999999999999999999999.999);
select ceiling(999999999999999999999.999);
+--enable_view_protocol
#
#
select 99999999999999999999999999999999999999 mod 3;
@@ -606,9 +609,12 @@ select round(99999999999999999.999,3);
select round(-99999999999999999.999,3);
#-- should return -100000000000000000.000
#
+#enable after fix MDEV-28660
+--disable_view_protocol
select truncate(99999999999999999999999999999999999999,49);
#-- should return 99999999999999999999999999999999999999.000
#
+--enable_view_protocol
select truncate(99.999999999999999999999999999999999999,49);
#-- should return 99.9999999999999999999999999999999
#
@@ -860,7 +866,10 @@ select 0/0;
#
--disable_ps_protocol
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as x;
+#enableview protocol after fix MDEV-28659
+--disable_view_protocol
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x;
+--enable_view_protocol
--enable_ps_protocol
#
# Bug #10004
@@ -943,7 +952,10 @@ drop table t1;
#
# Bug #10891 (converting to decimal crashes server)
#
+#enable after fix MDEV-27871
+--disable_view_protocol
select cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15));
+--enable_view_protocol
#
# Bug #11708 (conversion to decimal fails in decimal part)
@@ -1231,12 +1243,16 @@ DROP TABLE t1;
#
# Bug #36270: incorrect calculation result - works in 4.1 but not in 5.0 or 5.1
#
+#enable after fix MDEV-27871
+--disable_view_protocol
# show that if we need to truncate the scale of an operand, we pick the
# right one (that is, we discard the least significant decimal places)
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000);
+--enable_view_protocol
+
#
# Bug #31616 div_precision_increment description looks wrong
#
@@ -1255,7 +1271,13 @@ DROP TABLE t1;
let $nine_81=
999999999999999999999999999999999999999999999999999999999999999999999999999999999;
+
+#view protocol generates additional warning
+--disable_view_protocol
eval SELECT substring(('M') FROM ($nine_81)) AS foo;
+--enable_view_protocol
+#enable after fix MDEV-28661
+--disable_view_protocol
eval SELECT min($nine_81) AS foo;
eval SELECT multipolygonfromtext(('4294967294.1'),($nine_81)) AS foo;
eval SELECT convert(($nine_81), decimal(30,30)) AS foo;
@@ -1267,6 +1289,7 @@ eval SELECT date_sub(($nine_81),
day_minute)
AS foo;
eval SELECT truncate($nine_81, 28) AS foo;
+--enable_view_protocol
--echo End of 5.0 tests
@@ -1901,9 +1924,10 @@ drop table t1;
--echo # decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision'
--echo # failed in decimal_bin_size_inline/decimal_bin_size.
--echo #
-
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT AVG(DISTINCT 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001);
-
+--enable_view_protocol
CREATE TABLE t1 AS SELECT NULL AS v1;
SELECT 1 FROM t1 GROUP BY v1 ORDER BY AVG ( from_unixtime ( '' ) ) ;
DROP TABLE t1;
diff --git a/mysql-test/main/type_num.test b/mysql-test/main/type_num.test
index cc715d6cda2..251734e4d1b 100644
--- a/mysql-test/main/type_num.test
+++ b/mysql-test/main/type_num.test
@@ -687,6 +687,7 @@ SELECT
--echo #
--disable_ps_protocol
+--disable_view_protocol
--enable_metadata
SELECT NULL+1 AS c0,
COALESCE(NULL)+1 AS c2,
@@ -696,6 +697,7 @@ SELECT NULL+1 AS c0,
COALESCE(COALESCE(''))+1 AS c6;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
--echo #
--echo # Start of 10.2 tests
diff --git a/mysql-test/main/type_time.test b/mysql-test/main/type_time.test
index 0739348fcf0..0f67223238c 100644
--- a/mysql-test/main/type_time.test
+++ b/mysql-test/main/type_time.test
@@ -134,9 +134,12 @@ drop table t1;
--echo #
--echo # MDEV-4634 Crash in CONVERT_TZ
--echo #
+#enable after fix MDEV-27871
+--disable_view_protocol
SET timestamp=unix_timestamp('2001-02-03 10:20:30');
SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5');
SET timestamp=DEFAULT;
+--enable_view_protocol
--echo #
--echo # MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00')))
@@ -851,7 +854,10 @@ DROP TABLE t1;
--echo #
SET timestamp=UNIX_TIMESTAMP('2001-01-01 00:00:00');
SELECT TIME'10:20:30' IN (102030,TIME'10:20:31');
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32');
+--enable_view_protocol
CREATE TABLE t1 (a TIME);
INSERT INTO t1 VALUES ('10:20:30'),('10:20:31'),('10:20:32');
SELECT a FROM t1 WHERE a IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32') ORDER BY a;
diff --git a/mysql-test/main/type_time_round.test b/mysql-test/main/type_time_round.test
index 6d4b2d8947a..85b960ab196 100644
--- a/mysql-test/main/type_time_round.test
+++ b/mysql-test/main/type_time_round.test
@@ -177,8 +177,11 @@ DROP TABLE t1;
--echo # Literal corner case
--echo #
+#check after fix MDEV-29534 and MDEV-29526
+--disable_view_protocol
SELECT TIME'838:59:59.999999';
--error ER_WRONG_VALUE
SELECT TIME'838:59:59.9999999';
--error ER_WRONG_VALUE
SELECT TIME'839:00:00';
+--enable_view_protocol
diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test
index b5f028a6866..661ec56a04f 100644
--- a/mysql-test/main/type_timestamp.test
+++ b/mysql-test/main/type_timestamp.test
@@ -717,10 +717,13 @@ SET sql_mode=DEFAULT;
--echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
--echo #
+#double warning
+--disable_view_protocol
CREATE TABLE t1 (a INT, b TIMESTAMP) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'2018-06-19 00:00:00');
SELECT NULLIF(b, 'N/A') AS f, MAX(a) FROM t1 GROUP BY f;
DROP TABLE t1;
+--enable_view_protocol
--echo #
--echo # MDEV-17972 Assertion `is_valid_value_slow()' failed in Datetime::Datetime
diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test
index 09538fab805..7672fa94968 100644
--- a/mysql-test/main/type_year.test
+++ b/mysql-test/main/type_year.test
@@ -155,12 +155,15 @@ DROP TABLE t1;
--echo # Bug #59211: Select Returns Different Value for min(year) Function
--echo #
+#enable after fix MDEV-28673
+--disable_view_protocol
CREATE TABLE t1(c1 YEAR(4));
INSERT INTO t1 VALUES (1901),(2155),(0000);
SELECT * FROM t1;
SELECT COUNT(*) AS total_rows, MIN(c1) AS min_value, MAX(c1) FROM t1;
SELECT COUNT(*) AS total_rows, MIN(c1+0) AS min_value, MAX(c1+0) FROM t1;
DROP TABLE t1;
+--enable_view_protocol
--echo #
--echo # WL#6219: Deprecate and remove YEAR(2) type
@@ -366,12 +369,14 @@ DROP TABLE t2,t1;
CREATE TABLE t1 (a YEAR);
INSERT INTO t1 VALUES (2000),(2001);
SELECT MAX( NULLIF( a, 1970 ) ) AS f FROM t1;
+--disable_view_protocol
--disable_ps_protocol
--enable_metadata
SELECT NULLIF(a, 1970) AS f FROM t1 ORDER BY a;
SELECT MAX(NULLIF(a, 1970)) AS f FROM t1;
--disable_metadata
--enable_ps_protocol
+--enable_view_protocol
DROP TABLE t1;
--disable_prepare_warnings
diff --git a/mysql-test/main/udf.test b/mysql-test/main/udf.test
index 058f131273d..e9823a31863 100644
--- a/mysql-test/main/udf.test
+++ b/mysql-test/main/udf.test
@@ -247,6 +247,9 @@ DROP FUNCTION avgcost;
# Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
# the UDF
#
+
+#enable view prtotocol after fix MDEV-28677
+--disable_view_protocol
select * from mysql.func;
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
@@ -259,6 +262,7 @@ select * from mysql.func;
--error 1305
select is_const(3);
+--enable_view_protocol
#
# Bug#18761: constant expression as UDF parameters not passed in as constant
@@ -400,6 +404,8 @@ DROP TABLE const_len_bug;
# Bug #30355: Incorrect ordering of UDF results
#
+#enable view protocol after fix MDEV-28678
+--disable_view_protocol
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION udf_sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
CREATE TABLE t1 (a INT);
@@ -415,6 +421,7 @@ SELECT * FROM t2 WHERE a = udf_sequence();
DROP FUNCTION udf_sequence;
DROP TABLE t1,t2;
+--enable_view_protocol
#
# Bug#31767 (DROP FUNCTION name resolution)
diff --git a/mysql-test/main/udf_debug_sync.test b/mysql-test/main/udf_debug_sync.test
index 593500c1e18..0b5be340054 100644
--- a/mysql-test/main/udf_debug_sync.test
+++ b/mysql-test/main/udf_debug_sync.test
@@ -4,6 +4,7 @@
#
# MDEV-5616 - Deadlock between CREATE/DROP FUNCTION and SELECT from view
#
+--disable_service_connection
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
CREATE VIEW v1 AS SELECT myfunc_int(1);
@@ -38,3 +39,4 @@ connection default;
SET debug_sync='RESET';
DROP VIEW v1;
DROP FUNCTION myfunc_int;
+--enable_service_connection
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index a34e76591ec..c53c2700535 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -26,6 +26,7 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g
--error 1250
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b;
explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
+--disable_view_protocol
select count(*) from (
(select a,b from t1 limit 2) union all (select a,b from t2 order by a)) q;
(select sql_calc_found_rows a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 2;
@@ -34,7 +35,7 @@ select count(*) from (
select a,b from t1 union all select a,b from t2) q;
select sql_calc_found_rows a,b from t1 union all select a,b from t2 limit 2;
select found_rows();
-
+--enable_view_protocol
#
# Test some error conditions with UNION
#
@@ -210,6 +211,7 @@ insert into t1 values (1),(2),(3);
create table t2 (a int);
insert into t2 values (3),(4),(5);
+--disable_view_protocol
# Test global limits
SELECT COUNT(*) FROM (
(SELECT * FROM t1) UNION all (SELECT * FROM t2)) q;
@@ -235,12 +237,15 @@ SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q;
(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1;
select found_rows();
+--enable_view_protocol
# In these case found_rows() should work
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2;
+--disable_view_protocol
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION all SELECT * FROM t2 LIMIT 2;
select found_rows();
+--enable_view_protocol
# The following examples will not be exact
SELECT COUNT(*) FROM (
@@ -248,12 +253,16 @@ SELECT * FROM t1 UNION SELECT * FROM t2) q;
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2;
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION all SELECT * FROM t2) q;
+--disable_view_protocol
(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION all SELECT * FROM t2 LIMIT 2;
select found_rows();
+--enable_view_protocol
SELECT COUNT(*) FROM (
SELECT * FROM t1 UNION all SELECT * FROM t2) q;
+--disable_view_protocol
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100;
select found_rows();
+--enable_view_protocol
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2;
SELECT COUNT(*) FROM (
@@ -269,8 +278,10 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2 LIMIT 2;
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q;
(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 2;
+--disable_view_protocol
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2,2;
select found_rows();
+--enable_view_protocol
SELECT COUNT(*) FROM (
SELECT * FROM t1 UNION SELECT * FROM t2) q;
--error ER_PARSE_ERROR
@@ -502,6 +513,7 @@ insert t1 select a+1, a+b from t1;
insert t1 select a+1, a+b from t1;
insert t1 select a+1, a+b from t1;
FLUSH STATUS;
+--disable_view_protocol
show status like 'Slow_queries';
select count(*) from t1 where a=7;
show status like 'Slow_queries';
@@ -515,6 +527,7 @@ show status like 'Slow_queries';
flush status;
select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6);
show status like 'Slow_queries';
+--enable_view_protocol
drop table t1;
#
@@ -1363,8 +1376,10 @@ INSERT INTO t2 VALUES (4), (5), (6);
INSERT INTO t3 VALUES (7), (8), (9);
TRUNCATE table mysql.slow_log;
--sorted_result
+--disable_view_protocol
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3;
SELECT sql_text, rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%t17059925%';
+--enable_view_protocol
DROP TABLE t17059925, t2, t3;
## Reset to initial values
@@ -1877,6 +1892,7 @@ drop table t1,t2,t3;
--disable_ps_protocol
--enable_metadata
+--disable_view_protocol
SELECT CAST(1 AS UNSIGNED) UNION ALL SELECT * from (SELECT NULL) t;
SELECT CAST(1 AS SIGNED) UNION ALL SELECT * from (SELECT NULL) t;
@@ -1885,6 +1901,7 @@ SELECT CAST(1 AS SIGNED) UNION ALL SELECT * from (SELECT CAST(1 AS UNSIGNED)) t;
SELECT CAST(1 AS UNSIGNED) UNION ALL SELECT NULL;
SELECT CAST(1 AS UNSIGNED) UNION ALL SELECT CAST(1 AS SIGNED);
+--enable_view_protocol
--disable_metadata
--enable_ps_protocol
@@ -1913,6 +1930,7 @@ DROP TABLE t1, t2, t3, t4;
set @@default_storage_engine=@save_default_storage_engine;
+
--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/update.test b/mysql-test/main/update.test
index 84709102f96..8a6949447ee 100644
--- a/mysql-test/main/update.test
+++ b/mysql-test/main/update.test
@@ -233,9 +233,12 @@ drop table t1;
create table t1 ( a int, b int default 0, index (a) );
insert into t1 (a) values (0),(0),(0),(0),(0),(0),(0),(0);
+# the view protocol creates an additional statistics data
+--disable_view_protocol
flush status;
select a from t1 order by a limit 1;
show status like 'handler_read%';
+--enable_view_protocol
flush status;
update t1 set a=9999 order by a limit 1;
diff --git a/mysql-test/main/update_innodb.test b/mysql-test/main/update_innodb.test
index a5c6acf8620..c213ba8b331 100644
--- a/mysql-test/main/update_innodb.test
+++ b/mysql-test/main/update_innodb.test
@@ -105,7 +105,7 @@ drop table t1,t2;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @@use_stat_tables= @save_use_stat_tables;
-
+--disable_view_protocol
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY) engine=innodb;
INSERT INTO t1 VALUES (1);
@@ -159,5 +159,6 @@ commit;
--connection default
disconnect con2;
drop table t1,t2;
+--enable_view_protocol
--echo # End of 10.4 tests
diff --git a/mysql-test/main/upgrade.test b/mysql-test/main/upgrade.test
index e7a3e4d8abf..ed75b864967 100644
--- a/mysql-test/main/upgrade.test
+++ b/mysql-test/main/upgrade.test
@@ -1,6 +1,9 @@
call mtr.add_suppression("Invalid .old.. table or database name");
--source include/not_embedded.inc
+#remove this include after fix MDEV-27872
+--source include/no_view_protocol.inc
+
--disable_warnings
drop database if exists `mysqltest1`;
drop database if exists `mysqltest-1`;
diff --git a/mysql-test/main/upgrade_mdev_24363.test b/mysql-test/main/upgrade_mdev_24363.test
index cdb49037a40..c188d4c7fac 100644
--- a/mysql-test/main/upgrade_mdev_24363.test
+++ b/mysql-test/main/upgrade_mdev_24363.test
@@ -9,7 +9,7 @@
--echo # Test that mysql.user password_expired column
--echo # shows the right value as in mysql.global_priv
--echo #
-
+--disable_service_connection
create user gigi@localhost;
show create user gigi@localhost;
select password_expired from mysql.user where user='gigi' and host='localhost';
@@ -19,6 +19,7 @@ show create user gigi@localhost;
select password_expired from mysql.user where user='gigi' and host='localhost';
drop user gigi@localhost;
+--enable_service_connection
--echo #
--echo # Test that upgrades from 10.4+ versions before this mdev
diff --git a/mysql-test/main/user_var.test b/mysql-test/main/user_var.test
index d7a1cae126c..589043f096e 100644
--- a/mysql-test/main/user_var.test
+++ b/mysql-test/main/user_var.test
@@ -1,6 +1,7 @@
# Initialise
source include/have_sequence.inc;
+
--error 1054
set @a := foo;
set @a := connection_id() + 3;
@@ -492,6 +493,7 @@ DROP TABLE t1;
--echo # Check that used memory extends if we set a variable
--echo #
+--disable_service_connection
# Execute twice so number stablizes a bit
let $tmp= `select memory_used from information_schema.processlist`;
set @var= repeat('a',20000);
@@ -501,6 +503,7 @@ let $tmp2= `select memory_used from information_schema.processlist`;
eval select $tmp < $tmp2;
--enable_column_names
--enable_query_log
+--enable_service_connection
#
# MDEV-13897 SELECT @a := MAX(col) FROM t requires full index scan
diff --git a/mysql-test/main/userstat-badlogin-4824.test b/mysql-test/main/userstat-badlogin-4824.test
index 78f2150e446..12cca9f12b3 100644
--- a/mysql-test/main/userstat-badlogin-4824.test
+++ b/mysql-test/main/userstat-badlogin-4824.test
@@ -1,6 +1,10 @@
#
# MDEV-4824 userstats - wrong user statistics
#
+# 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
+
--source include/not_embedded.inc
set @save_userstat=@@global.userstat;
diff --git a/mysql-test/main/varbinary.test b/mysql-test/main/varbinary.test
index f03f3fcf703..b35819b0fb3 100644
--- a/mysql-test/main/varbinary.test
+++ b/mysql-test/main/varbinary.test
@@ -142,13 +142,19 @@ select x'41', 0+x'3635';
select N'abc', length(N'abc');
+#enable after fix MDEV-28535
+--disable_view_protocol
select N'', length(N'');
select '', length('');
+--enable_view_protocol
+#enable after fix MDEV-28696
+--disable_view_protocol
select b'', 0+b'';
select x'', 0+x'';
+--enable_view_protocol
--error ER_BAD_FIELD_ERROR
select 0x;
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index d5fdd1e79f0..0644e4d03f2 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -1,6 +1,9 @@
#
# Window Functions Tests
#
+#remove this include after fix MDEV-27871, MDEV-27938
+--source include/no_view_protocol.inc
+
--source include/have_sequence.inc
--disable_warnings
diff --git a/mysql-test/main/win_avg.test b/mysql-test/main/win_avg.test
index 23a3652d943..86edcce5679 100644
--- a/mysql-test/main/win_avg.test
+++ b/mysql-test/main/win_avg.test
@@ -35,7 +35,8 @@ insert into t1 values
(126 , 6, 1, NULL),
(127 , 6, 1, NULL);
-
+#enable after fix MDEV-27871
+--disable_view_protocol
--sorted_result
select pk, a, b, avg(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
from t1;
@@ -43,5 +44,5 @@ from t1;
--sorted_result
select pk, a, c, avg(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
from t1;
-
+--enable_view_protocol
drop table t1;
diff --git a/mysql-test/main/win_big-mdev-10092.test b/mysql-test/main/win_big-mdev-10092.test
index 090d43b0b7b..c4bda66018b 100644
--- a/mysql-test/main/win_big-mdev-10092.test
+++ b/mysql-test/main/win_big-mdev-10092.test
@@ -85,6 +85,9 @@ call add_data();
call add_data();
set sort_buffer_size = 1024;
+#enable after fix MDEV-27871
+--disable_view_protocol
+
flush status;
select o_custkey, Avg(o_custkey) OVER ( ORDER BY o_custkey ) from orders;
select variable_name,
@@ -99,5 +102,7 @@ select variable_name,
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
+
drop table orders;
drop procedure add_data;
diff --git a/mysql-test/main/win_big-mdev-11697.test b/mysql-test/main/win_big-mdev-11697.test
index 9488a938554..12dc4d4c09c 100644
--- a/mysql-test/main/win_big-mdev-11697.test
+++ b/mysql-test/main/win_big-mdev-11697.test
@@ -40,6 +40,8 @@ commit;
analyze table test_table;
explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10;
+#enable after fix MDEV-27871
+--disable_view_protocol
flush status;
select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10;
@@ -47,6 +49,7 @@ select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
drop table test_table;
set max_recursive_iterations=default;
diff --git a/mysql-test/main/win_big.test b/mysql-test/main/win_big.test
index 09c8d640b09..e53eaa70291 100644
--- a/mysql-test/main/win_big.test
+++ b/mysql-test/main/win_big.test
@@ -28,10 +28,13 @@ select
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
from
t10;
+#enable after fix MDEV-27871
+--disable_view_protocol
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
set sort_buffer_size=1024;
flush status;
@@ -40,10 +43,13 @@ select
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
from
t10;
+#enable after fix MDEV-27871
+--disable_view_protocol
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
let $diff_tables= t21, t22;
source include/diff_tables.inc;
@@ -60,10 +66,13 @@ select
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
from
t10;
+#enable after fix MDEV-27871
+--disable_view_protocol
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
set sort_buffer_size=1024;
flush status;
@@ -74,10 +83,13 @@ select
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
from
t10;
+#enable after fix MDEV-27871
+--disable_view_protocol
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
let $diff_tables= t21, t22;
source include/diff_tables.inc;
@@ -94,11 +106,13 @@ select
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
from
t10;
-
+#enable after fix MDEV-27871
+--disable_view_protocol
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
set sort_buffer_size=1024;
flush status;
@@ -108,10 +122,13 @@ select
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
from
t10;
+#enable after fix MDEV-27871
+--disable_view_protocol
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
+--enable_view_protocol
let $diff_tables= t21, t22;
source include/diff_tables.inc;
diff --git a/mysql-test/main/win_first_last_value.test b/mysql-test/main/win_first_last_value.test
index 0a90a98a5d4..d027eb84702 100644
--- a/mysql-test/main/win_first_last_value.test
+++ b/mysql-test/main/win_first_last_value.test
@@ -27,6 +27,8 @@ select pk, first_value(pk) over (order by pk),
from t1
order by pk desc;
+#enable after fix MDEV-28535
+--disable_view_protocol
select pk,
first_value(pk) over (order by pk
RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING),
@@ -38,6 +40,7 @@ select pk,
RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
from t1
order by pk;
+--enable_view_protocol
select pk,
first_value(pk) over (order by pk desc),
diff --git a/mysql-test/main/win_nth_value.test b/mysql-test/main/win_nth_value.test
index b9764d1e9d7..2d47677f65c 100644
--- a/mysql-test/main/win_nth_value.test
+++ b/mysql-test/main/win_nth_value.test
@@ -42,11 +42,16 @@ select pk,
from t1
order by pk asc;
+#enable after fix MDEV-27871
+--disable_view_protocol
select pk,
a,
nth_value(pk, 1) over (partition by a order by pk ROWS between 1 preceding and 1 following)
from t1;
+--enable_view_protocol
+#enable after fix MDEV-28535
+--disable_view_protocol
select pk,
a,
nth_value(a, 1) over (order by a RANGE BETWEEN 1 preceding and 1 following),
@@ -63,5 +68,6 @@ select pk,
nth_value(a, 12) over (order by a RANGE BETWEEN 1 preceding and 1 following)
from t1
order by pk asc;
+--enable_view_protocol
drop table t1;
diff --git a/mysql-test/main/win_ntile.test b/mysql-test/main/win_ntile.test
index c65ba7e1521..c508b1627ad 100644
--- a/mysql-test/main/win_ntile.test
+++ b/mysql-test/main/win_ntile.test
@@ -152,6 +152,8 @@ select pk, a, b,
from t1;
select t1.a from t1 where pk = 13;
+#enable after fix MDEV-27871
+--disable_view_protocol
select pk, a, b,
ntile((select a from t1 where pk=13)) over (partition by b order by pk)
from t1;
@@ -160,6 +162,7 @@ explain
select pk, a, b,
ntile((select a from t1 where pk=13)) over (partition by b order by pk)
from t1;
+--enable_view_protocol
select a from t1;
--error ER_SUBQUERY_NO_1_ROW
diff --git a/mysql-test/main/win_orderby.test b/mysql-test/main/win_orderby.test
index 0d42c606486..7f02a582ea0 100644
--- a/mysql-test/main/win_orderby.test
+++ b/mysql-test/main/win_orderby.test
@@ -21,6 +21,8 @@ select
1
from t0 A, t0 B, t0 C;
+#enable after fix MDEV-27871
+--disable_view_protocol
select
pk,
count(a) over (order by pk rows between 2 preceding and 2 following)
@@ -28,5 +30,6 @@ from t1
where pk between 1 and 30
order by pk desc
limit 4;
+--disable_view_protocol
drop table t0,t1;
diff --git a/mysql-test/main/win_percentile.test b/mysql-test/main/win_percentile.test
index e981dc62c41..9626caffc54 100644
--- a/mysql-test/main/win_percentile.test
+++ b/mysql-test/main/win_percentile.test
@@ -50,11 +50,13 @@ select name, percentile_cont(null) within group(order by score) over (partition
--error ER_WRONG_TYPE_OF_ARGUMENT
select name, percentile_disc(null) within group(order by score) over (partition by name) from t1;
+--disable_view_protocol
--echo #subqueries having percentile functions
--sorted_result
select * from ( select name , percentile_cont(0.5) within group ( order by score) over (partition by name ) from t1 ) as t;
--sorted_result
select * from ( select name , percentile_disc(0.5) within group ( order by score) over (partition by name ) from t1 ) as t;
+--enable_view_protocol
--sorted_result
select name from t1 a where (select percentile_disc(0.5) within group (order by score) over (partition by name) from t1 b limit 1) >= 0.5;
@@ -62,7 +64,10 @@ select name from t1 a where (select percentile_disc(0.5) within group (order by
--error ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
select score, percentile_cont(0.5) within group(order by name) over (partition by score) from t1;
+#enable after fix MDEV-27871
+--disable_view_protocol
select score, percentile_disc(0.5) within group(order by name) over (partition by score) from t1;
+--enable_view_protocol
--echo #parameter value should be in the range of [0,1]
--error ER_ARGUMENT_OUT_OF_RANGE
diff --git a/mysql-test/main/win_std.test b/mysql-test/main/win_std.test
index c1964ecac98..e7986e2cf84 100644
--- a/mysql-test/main/win_std.test
+++ b/mysql-test/main/win_std.test
@@ -25,6 +25,9 @@ select std(c) over (order by a)
from t2;
--enable_warnings
+#enable after fix MDEV-27871
+--disable_view_protocol
+
--echo # Empty frame.
select std(b) over (order by a rows between 2 following and 1 following)
from t2;
@@ -135,6 +138,7 @@ from t2;
--sorted_result
select pk, a, b, std(b) over (order by a range between 0 following and 1 following)
from t2;
+--enable_view_protocol
drop table t1;
drop table t2;
diff --git a/mysql-test/main/win_sum.test b/mysql-test/main/win_sum.test
index 640576acc53..d76ec4d6d24 100644
--- a/mysql-test/main/win_sum.test
+++ b/mysql-test/main/win_sum.test
@@ -35,6 +35,8 @@ insert into t1 values
(126 , 6, 1, NULL),
(127 , 6, 1, NULL);
+#enable after fix MDEV-27871
+--disable_view_protocol
--sorted_result
select pk, a, b, sum(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
@@ -43,6 +45,7 @@ from t1;
--sorted_result
select pk, a, c, sum(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
from t1;
+--enable_view_protocol
drop table t1;
diff --git a/mysql-test/main/xa_prepared_binlog_off.test b/mysql-test/main/xa_prepared_binlog_off.test
index edbfa7c2825..7db25d7cc3f 100644
--- a/mysql-test/main/xa_prepared_binlog_off.test
+++ b/mysql-test/main/xa_prepared_binlog_off.test
@@ -5,6 +5,7 @@
--source include/not_valgrind.inc
--source include/not_embedded.inc
+--source include/no_view_protocol.inc
# Common part with XA binlogging testing
call mtr.add_suppression("You need to use --log-bin to make --log-slave-updates work.");
diff --git a/mysql-test/main/xml.test b/mysql-test/main/xml.test
index 3c7ecf6d060..f042c4371ce 100644
--- a/mysql-test/main/xml.test
+++ b/mysql-test/main/xml.test
@@ -166,11 +166,14 @@ select extractValue('<a b="b1" b="b2" b="b3"/>','/a/@b[2=position()]');
select extractValue('<a b="b1" b="b2" b="b3"/>','/a/@b[3=position()]');
select extractValue('<a b="b1" b="b2" b="b3"/>','/a/@b[2>=position()]');
select extractValue('<a b="b1" b="b2" b="b3"/>','/a/@b[2<=position()]');
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractValue('<a b="b1" b="b2" b="b3"/>','/a/@b[position()=3 or position()=2]');
SELECT extractValue('<a>a<b>a1<c>c1</c></b><b>a2</b></a>','/a/b[count(c)=0]');
SELECT extractValue('<a>a<b>a1<c>c1</c></b><b>a2</b></a>','/a/b[count(c)=1]');
select extractValue('<a>a1<b ba="1" ba="2">b1</b><b>b2</b>4</a>','/a/b[sum(@ba)=3]');
+--enable_view_protocol
select extractValue('<a><b>b1</b><b>b2</b></a>','/a/b[1]');
select extractValue('<a><b>b1</b><b>b2</b></a>','/a/b[boolean(1)]');
@@ -213,8 +216,11 @@ select extractValue(@xml,'/a/@b[contains(.,"1")][contains(.,"2")]');
select extractValue(@xml,'/a/@b[contains(.,"1")][contains(.,"2")][2]');
SET @xml='<a>a1<b>b1<c>c1</c>b2</b>a2</a>';
+#enable after fix MDEV-27871
+--disable_view_protocol
select UpdateXML('<a>a1<b>b1<c>c1</c>b2</b>a2</a>','/a/b/c','+++++++++');
select UpdateXML('<a>a1<b>b1<c>c1</c>b2</b>a2</a>','/a/b/c','<c1>+++++++++</c1>');
+--enable_view_protocol
select UpdateXML('<a>a1<b>b1<c>c1</c>b2</b>a2</a>','/a/b/c','<c1/>');
SET @xml='<a><b>bb</b></a>';
@@ -271,7 +277,10 @@ select extractvalue('<a><b>b</b><b!>b!</b!></a>','//b!');
#
select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/descendant::*');
select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/self::*');
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/descendant-or-self::*');
+--enable_view_protocol
# Bug #16320 XML: extractvalue() won't accept names containing underscores
#
select extractvalue('<A_B>A</A_B>','/A_B');
@@ -280,24 +289,36 @@ select extractvalue('<A_B>A</A_B>','/A_B');
# Bug#16318: XML: extractvalue() incorrectly returns last() = 1
#
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[position()]');
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=last()]');
+--enable_view_protocol
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()]');
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()-1]');
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()=1]');
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()=2]');
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()=position()]');
+--enable_view_protocol
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)]');
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)-1]');
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=1]');
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=2]');
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=position()]');
+--enable_view_protocol
#
# Bug#16316: XML: extractvalue() is case-sensitive with contains()
#
select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]');
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin);
select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
+--enable_view_protocol
#
# Bug#18285: ExtractValue not returning character
@@ -309,12 +330,16 @@ select ExtractValue('<tag1><![CDATA[test]]></tag1>','/tag1');
# Bug#18201: XML: ExtractValue works even if the xml fragment
# is not well-formed xml
#
+
+#view protocol generates additional warning
+--disable_view_protocol
select extractValue('<a>a','/a');
select extractValue('<a>a<','/a');
select extractValue('<a>a</','/a');
select extractValue('<a>a</a','/a');
select extractValue('<a>a</a></b>','/a');
select extractValue('<a b=>a</a>','/a');
+--enable_view_protocol
#
# Bug #18171 XML: ExtractValue: the XPath position()
@@ -358,22 +383,33 @@ DROP PROCEDURE p2;
# Bug#18170: XML: ExtractValue():
# XPath expression can't use QNames (colon in names)
#
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)');
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element');
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
-
+--enable_view_protocol
#
# Bug#20795 extractvalue() won't accept names containing a dot (.)
#
+#enable after fix MDEV-27871
+--disable_view_protocol
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/foo.bar');
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/something');
+--enable_view_protocol
#
# Bug#20854 XML functions: wrong result in ExtractValue
#
+#enable after fix MDEV-27871
+--disable_view_protocol
--error 1105
select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','/zot/tim0/02');
select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*');
+--enable_view_protocol
+
+#view protocol generates additional warning
+--disable_view_protocol
# dot and dash are bad identtifier start character
select extractValue('<.>test</.>','//*');
select extractValue('<->test</->','//*');
@@ -383,6 +419,7 @@ select extractValue('<:>test</:>','//*');
select extractValue('<_>test</_>','//*');
# dot, dash, underscore and semicolon are good identifier middle characters
select extractValue('<x.-_:>test</x.-_:>','//*');
+--enable_view_protocol
#
# Bug#22823 gt and lt operators appear to be
@@ -421,9 +458,13 @@ select ExtractValue(@xml, "/entry[(50<=pt)]/id");
# Test nodetypes in node name context
#
select ExtractValue('<a><b><Text>test</Text></b></a>','/a/b/Text');
+#enable after fix MDEV-27871
+--disable_view_protocol
select ExtractValue('<a><b><comment>test</comment></b></a>','/a/b/comment');
select ExtractValue('<a><b><node>test</node></b></a>','/a/b/node');
select ExtractValue('<a><b><processing-instruction>test</processing-instruction></b></a>','/a/b/processing-instruction');
+--enable_view_protocol
+
#
# Test keywords in node name contexts
#
@@ -439,6 +480,8 @@ select ExtractValue('<a><div:div>test</div:div></a>', '/a/div:div');
# Test axis names in node name context
#
select ExtractValue('<a><ancestor>test</ancestor></a>', '/a/ancestor');
+#enable after fix MDEV-27871
+--disable_view_protocol
select ExtractValue('<a><ancestor-or-self>test</ancestor-or-self></a>', '/a/ancestor-or-self');
select ExtractValue('<a><attribute>test</attribute></a>', '/a/attribute');
select ExtractValue('<a><child>test</child></a>', '/a/child');
@@ -450,6 +493,7 @@ select ExtractValue('<a><namespace>test</namespace></a>', '/a/namespace');
select ExtractValue('<a><parent>test</parent></a>', '/a/parent');
select ExtractValue('<a><preceding>test</preceding></a>', '/a/preceding');
select ExtractValue('<a><preceding-sibling>test</preceding-sibling></a>', '/a/preceding-sibling');
+--enable_view_protocol
select ExtractValue('<a><self>test</self></a>', '/a/self');
#
@@ -572,8 +616,12 @@ SELECT ExtractValue(@xml, 'html/body');
# These two documents will fail.
# Quoted strings are not allowed in regular tags
#
+#view protocol generates additional warning
+--disable_view_protocol
+
SELECT ExtractValue('<xml "xxx" "yyy">CharData</xml>', '/xml');
SELECT ExtractValue('<xml xxx "yyy">CharData</xml>', '/xml');
+--enable_view_protocol
#
# Bug#42495 updatexml: Assertion failed: xpath->context, file .\item_xmlfunc.cc, line 2507
@@ -603,7 +651,8 @@ INSERT INTO t1 (id, xml) VALUES
(15, '<?xml version="1.0"?><bla name="blubb"></bla>'),
(14, '<xml version="kaputt">');
-
+#enable after fix MDEV-28535
+--disable_view_protocol
SELECT
extractvalue( xml, '/bla/@name' ),
extractvalue( xml, '/bla/@name' )
@@ -614,6 +663,7 @@ SELECT
UpdateXML(xml, '/bla/@name', 'test'),
UpdateXML(xml, '/bla/@name', 'test')
FROM t1 ORDER BY t1.id;
+--enable_view_protocol
DROP TABLE t1;
@@ -643,14 +693,20 @@ SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
--echo #
--echo # Bug #44332 my_xml_scan reads behind the end of buffer
--echo #
+
+#view protocol generates additional warning
+--disable_view_protocol
SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
+--enable_view_protocol
--echo #
--echo # Bug#11766725 (bug#59901): EXTRACTVALUE STILL BROKEN AFTER FIX FOR BUG #44332
--echo #
+#view protocol generates additional warning
+--disable_view_protocol
SELECT ExtractValue(CONVERT('<\"', BINARY(10)), 1);
-
+--enable_view_protocol
--echo End of 5.1 tests
--echo #
@@ -660,8 +716,11 @@ SELECT ExtractValue(CONVERT('<\"', BINARY(10)), 1);
--echo #
--echo # MDEV-5338 XML parser accepts malformed data
--echo #
+#view protocol generates additional warning
+--disable_view_protocol
SELECT ExtractValue('<a>xxx</c>','/a/b');
SELECT ExtractValue('<a><b>xxx</c></a>','/a/b');
+--enable_view_protocol
--echo #
--echo # End of 5.3 tests
@@ -673,8 +732,11 @@ SELECT ExtractValue('<a><b>xxx</c></a>','/a/b');
--echo #
--echo # Bug#58175 xml functions read initialized bytes when conversions happen
--echo #
+#view protocol generates additional warning
+--disable_view_protocol
SET NAMES latin1;
SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0);
+--enable_view_protocol
--echo #
--echo # Bug#12375190: UPDATEXML CRASHES ON SIMPLE INPUTS
@@ -689,7 +751,10 @@ SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b');
# MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes
# MySQL bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP
#
+#enable after fix MDEV-27871
+--disable_view_protocol
SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)');
+--enable_view_protocol
--echo #
--echo # Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars