MDEV-24588, 36851 followup: Fix derived, hybrid func test for --view-protocol
This commit is contained in:
parent
bff9b1e472
commit
bfa3c312e6
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user