mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
This commit is contained in:
@@ -2413,3 +2413,24 @@ SELECT my_sqrt FROM v1 ORDER BY my_sqrt;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #18237: invalid count optimization applied to an outer join with a view
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (id int PRIMARY KEY);
|
||||
CREATE TABLE t2 (id int PRIMARY KEY);
|
||||
|
||||
INSERT INTO t1 VALUES (1), (3);
|
||||
INSERT INTO t2 VALUES (1), (2), (3);
|
||||
|
||||
CREATE VIEW v2 AS SELECT * FROM t2;
|
||||
|
||||
SELECT COUNT(*) FROM t1 LEFT JOIN t2 ON t1.id=t2.id;
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t1.id=t2.id;
|
||||
|
||||
SELECT COUNT(*) FROM t1 LEFT JOIN v2 ON t1.id=v2.id;
|
||||
|
||||
DROP VIEW v2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
Reference in New Issue
Block a user