Details
Description
Expected that "select from table" and "select from view" give the same result:
Test:
CREATE TABLE t1 (f1 INT); |
INSERT INTO t1 VALUES (1),(2); |
|
CREATE TABLE t2 (f2 int); |
INSERT INTO t2 VALUES (3); |
|
SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; |
CREATE VIEW v1 AS SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; |
SELECT * FROM v1; |
|
DROP VIEW v1; |
DROP TABLES t1,t2; |
Actual result:
SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; |
( SELECT MAX(f1) FROM t2 ) |
2
|
CREATE VIEW v1 AS SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; |
SELECT * FROM v1; |
( SELECT MAX(f1) FROM t2 ) |
1
|
2
|
Expected result:
SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; |
( SELECT MAX(f1) FROM t2 ) |
2
|
CREATE VIEW v1 AS SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; |
SELECT * FROM v1; |
( SELECT MAX(f1) FROM t2 ) |
2
|
Attachments
Issue Links
- duplicates
-
MDEV-30706 Different results of selects from view and CTE with same definition
- Closed
- is part of
-
MDEV-27691 make working view-protocol
- Open