mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0 mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/view.test: Auto merged sql/item_cmpfunc.cc: Auto merged
This commit is contained in:
@@ -2439,3 +2439,23 @@ SELECT COUNT(*) FROM t1 LEFT JOIN v2 ON t1.id=v2.id;
|
||||
DROP VIEW v2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bug #16069: VIEW does return the same results as underlying SELECT
|
||||
# with WHERE condition containing BETWEEN over dates
|
||||
|
||||
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
|
||||
td date DEFAULT NULL, KEY idx(td));
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
|
||||
(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
|
||||
(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
|
||||
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
|
||||
SELECT * FROM t1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
|
||||
SELECT * FROM v1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
Reference in New Issue
Block a user