~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/distinct.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
553
553
DROP TABLE t1;
554
554
 
555
555
--echo End of 5.0 tests
 
556
 
 
557
#
 
558
# Bug #34928: Confusion by having Primary Key and Index
 
559
#
 
560
CREATE TABLE t1(a INT, b INT, c INT, d INT, e INT,
 
561
                PRIMARY KEY(a,b,c,d,e),
 
562
                KEY(a,b,d,c)
 
563
);
 
564
 
 
565
INSERT INTO t1(a, b, c) VALUES (1, 1, 1),
 
566
                               (1, 1, 2),
 
567
                               (1, 1, 3),
 
568
                               (1, 2, 1),
 
569
                               (1, 2, 2),
 
570
                               (1, 2, 3);
 
571
 
 
572
EXPLAIN SELECT DISTINCT a, b, d, c FROM t1;
 
573
 
 
574
SELECT DISTINCT a, b, d, c FROM t1;
 
575
 
 
576
DROP TABLE t1;
 
577
 
 
578
--echo End of 5.1 tests