~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen, Otto Kekäläinen, James Page
  • Date: 2014-03-02 01:38:26 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140302013826-z3afnfteqo86pccd
Tags: 5.5.36-1
[ Otto Kekäläinen ]
* New upstream release.
* Updated Danish debconf translation (Closes: #739750).
* d/control: Added explicit Conflicts/Replaces for mysql-5.6 packages
  (Closes: #739841).
* d/control: Update for use of virtual-* packages for switching to/from
  MySQL alternatives.

[ James Page ]
* d/control: Drop Nicholas from Uploaders, MIA (Closes: #739360).
* d/control: Add libjemalloc-dev to BD's.

Show diffs side-by-side

added added

removed removed

Lines of Context:
750
750
SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1;
751
751
DROP TABLE t1;
752
752
 
 
753
--echo #
 
754
--echo # Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN.
 
755
--echo # Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK 
 
756
--echo #
 
757
 
 
758
SET @tmp_table_size_save= @@tmp_table_size;
 
759
SET @@tmp_table_size= 1024;
 
760
 
 
761
CREATE TABLE t1 (a INT);
 
762
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
 
763
INSERT INTO t1 SELECT a+8 FROM t1;
 
764
INSERT INTO t1 SELECT a+16 FROM t1;
 
765
INSERT INTO t1 SELECT a+32 FROM t1;
 
766
INSERT INTO t1 SELECT a+64 FROM t1;
 
767
INSERT INTO t1 VALUE(NULL);
 
768
SELECT COUNT(DISTINCT a) FROM t1;
 
769
SELECT COUNT(DISTINCT (a+0)) FROM t1;
 
770
DROP TABLE t1;
 
771
 
 
772
create table tb(
 
773
id int auto_increment primary key,
 
774
v varchar(32))
 
775
engine=myisam charset=gbk;
 
776
insert into tb(v) values("aaa");
 
777
insert into tb(v) (select v from tb);
 
778
insert into tb(v) (select v from tb);
 
779
insert into tb(v) (select v from tb);
 
780
insert into tb(v) (select v from tb);
 
781
insert into tb(v) (select v from tb);
 
782
insert into tb(v) (select v from tb);
 
783
 
 
784
update tb set v=concat(v, id);
 
785
select count(distinct case when id<=64 then id end) from tb;
 
786
select count(distinct case when id<=63 then id end) from tb;
 
787
drop table tb;
 
788
 
 
789
SET @@tmp_table_size= @tmp_table_size_save;
 
790
 
753
791
--echo End of 5.5 tests