From bfa3c312e6021d16c591e8f9eb351bc921cc09f5 Mon Sep 17 00:00:00 2001 From: Raghunandan Bhat Date: Thu, 12 Jun 2025 19:02:36 +0530 Subject: [PATCH] MDEV-24588, 36851 followup: Fix derived, hybrid func test for --view-protocol --- mysql-test/main/derived.test | 2 ++ mysql-test/main/func_hybrid_type.test | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test index 7b924437b30..06f8a6d7cba 100644 --- a/mysql-test/main/derived.test +++ b/mysql-test/main/derived.test @@ -1194,6 +1194,7 @@ drop table t1,t2,t3; --echo # Tests from the bug report +--disable_view_protocol CREATE TABLE t (pk INT PRIMARY KEY); INSERT INTO t VALUES (1), (2), (3); @@ -1248,6 +1249,7 @@ SHOW CREATE VIEW v1; DROP VIEW v_t, v1; DROP TABLE t; +--enable_view_protocol --echo # Tests on views created using SELECT statements that contain derived columns diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test index 471debe163c..e334597b7fd 100644 --- a/mysql-test/main/func_hybrid_type.test +++ b/mysql-test/main/func_hybrid_type.test @@ -1212,19 +1212,23 @@ INSERT INTO t values (1, 2.3, 'four', '2025-05-06'); --enable_metadata --disable_ps_protocol +--disable_view_protocol SELECT COALESCE(c1, 10) AS coalesced_c1, IFNULL(c1, 10) AS ifnull_c1 FROM t; SELECT COALESCE(c1, NULL) AS coalesced_c1, IFNULL(c1, NULL) AS ifnull_c1 FROM t; SELECT COALESCE(c2, NULL) AS coalesced_c2, IFNULL(c2, NULL) as ifnull_c2 FROM t; SELECT COALESCE(c3, 'two') as coalesced_c1, COALESCE(c4, '2025-07-08') AS coalesced_date FROM t; +--enable_view_protocol --enable_ps_protocol --disable_metadata INSERT INTO t values (2, 3.4, NULL, NULL); --enable_metadata --disable_ps_protocol +--disable_view_protocol SELECT COALESCE(c3, 'two') AS coalesced_c3, IFNULL(c3, 'three') AS ifnull_c3 FROM t WHERE c1 = 2; SELECT COALESCE(c3, 'four', NULL) AS coalesced_c3, COALESCE(COALESCE(c3, NULL), NULL) AS coalesced_c3_null FROM t WHERE c1 = 2; SELECT COALESCE(c4, COALESCE('2025-05-06', NULL)) AS coalesced_date FROM t WHERE c1 = 2; +--enable_view_protocol --enable_ps_protocol --disable_metadata