diff options
author | Lena Startseva <lena.startseva@mariadb.com> | 2022-09-15 18:30:13 +0700 |
---|---|---|
committer | Lena Startseva <lena.startseva@mariadb.com> | 2022-09-23 19:47:30 +0700 |
commit | 184e65954b88266bd426de1c82973bf54a88afb1 (patch) | |
tree | 482b5be7d68aad5c18a47e439c1f5d0929bd34a8 | |
parent | 78dcf71e88c86772f89f4ae788079c3619a4d38c (diff) | |
download | mariadb-git-184e65954b88266bd426de1c82973bf54a88afb1.tar.gz |
MDEV-27691: make working view-protocol
Update tests for version 10.4
36 files changed, 148 insertions, 23 deletions
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 09ed769c898..05e359d1c71 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; @@ -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; backup stage end; select lock_mode from information_schema.metadata_lock_info; 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 d6db7a6364e..1f3e4a8704d 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 d2f3d95d703..99d748abd05 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/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/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/flush.test b/mysql-test/main/flush.test index 69567b03a5a..88b04ad2843 100644 --- a/mysql-test/main/flush.test +++ b/mysql-test/main/flush.test @@ -425,6 +425,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 @@ -500,7 +501,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 @@ -538,6 +539,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 @@ -580,7 +582,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 diff --git a/mysql-test/main/func_debug.test b/mysql-test/main/func_debug.test index f6d6fa4c4e7..1fbc652bb48 100644 --- a/mysql-test/main/func_debug.test +++ b/mysql-test/main/func_debug.test @@ -530,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_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_hybrid_type.test b/mysql-test/main/func_hybrid_type.test index fda3b2c3ebc..2cb53c0cd53 100644 --- a/mysql-test/main/func_hybrid_type.test +++ b/mysql-test/main/func_hybrid_type.test @@ -769,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 @@ -782,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 diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test index d65db5786a6..51452d3e6af 100644 --- a/mysql-test/main/func_math.test +++ b/mysql-test/main/func_math.test @@ -565,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: diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test index 5c61157bca4..ed9ae20e9bd 100644 --- a/mysql-test/main/func_time.test +++ b/mysql-test/main/func_time.test @@ -3211,7 +3211,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'); @@ -3226,11 +3229,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_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/having_cond_pushdown.test b/mysql-test/main/having_cond_pushdown.test index aee5a770fa9..6d42b4ffefe 100644 --- a/mysql-test/main/having_cond_pushdown.test +++ b/mysql-test/main/having_cond_pushdown.test @@ -1447,8 +1447,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/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/intersect.test b/mysql-test/main/intersect.test index 9170431692a..31cfcf00c5f 100644 --- a/mysql-test/main/intersect.test +++ b/mysql-test/main/intersect.test @@ -216,13 +216,10 @@ CREATE TABLE t (i INT); INSERT INTO t VALUES (1),(2); SELECT * FROM t WHERE i != ANY ( SELECT 6 INTERSECT SELECT 3 ); -#enable view protocol in 10.4 ---disable_view_protocol select i from t where exists ((select 6 as r from dual having t.i <> 6) intersect (select 3 from dual having t.i <> 3)); ---enable_view_protocol drop table t; diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 855ce11aaf5..0785d828a07 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; @@ -271,6 +272,7 @@ begin end| delimiter ;| +--disable_view_protocol set optimizer_trace='enabled=on'; select f1(a) from t1; select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE; @@ -280,11 +282,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); @@ -303,7 +306,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 # @@ -400,6 +403,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; @@ -498,6 +503,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 @@ -527,6 +533,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; @@ -536,6 +544,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 @@ -546,8 +555,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 # @@ -577,7 +588,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 # @@ -589,10 +603,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 @@ -603,12 +620,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 # @@ -619,7 +639,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'; @@ -637,11 +660,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 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/parser.test b/mysql-test/main/parser.test index 2d2c0cadeae..e4ca1823c60 100644 --- a/mysql-test/main/parser.test +++ b/mysql-test/main/parser.test @@ -858,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 @@ -889,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 @@ -1679,7 +1684,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 @@ -1687,11 +1692,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); @@ -1701,6 +1708,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/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 17fbf2ca25e..ab0157b894d 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 db92f6ee453..9cbc294f84a 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 349d574227a..579587ef071 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/row.test b/mysql-test/main/row.test index 87cf66aa2de..2bffb18eeff 100644 --- a/mysql-test/main/row.test +++ b/mysql-test/main/row.test @@ -11,8 +11,8 @@ select row(10,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3)); --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)); ---enable_view_protocol 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)); @@ -259,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/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/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/type_date.test b/mysql-test/main/type_date.test index 39bfe07a1bd..27d03bd888c 100644 --- a/mysql-test/main/type_date.test +++ b/mysql-test/main/type_date.test @@ -770,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_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_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 9c5b57b8885..485da666661 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/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_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 |