1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fixed DISTINCT in subselect bug

small Item_ref fix
This commit is contained in:
bell@sanja.is.com.ua
2002-10-23 23:36:11 +03:00
parent cd032e0418
commit c2da10ae18
4 changed files with 18 additions and 8 deletions

View File

@ -198,4 +198,10 @@ EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY No tables used
2 SUBSELECT searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 where used; Using index
SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03';
date
2002-08-03
SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
(SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03')
2002-08-03
drop table searchconthardwarefr3;

View File

@ -108,4 +108,6 @@ INSERT INTO searchconthardwarefr3 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03';
EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03';
SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
drop table searchconthardwarefr3;