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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): James Page, Otto Kekäläinen
  • Date: 2014-02-17 16:51:52 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140217165152-k315d3175g865kkx
Tags: 5.5.35-1
[ Otto Kekäläinen ]
* New upstream release, fixing the following security issues:
  - Buffer overflow in client/mysql.cc (Closes: #737597).
    - CVE-2014-0001
  - http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html
    - CVE-2013-5891
    - CVE-2013-5908
    - CVE-2014-0386
    - CVE-2014-0393
    - CVE-2014-0401
    - CVE-2014-0402
    - CVE-2014-0412
    - CVE-2014-0420
    - CVE-2014-0437
* Upstream https://mariadb.atlassian.net/browse/MDEV-4902
  fixes compatibility with Bison 3.0 (Closes: #733002)
* Updated Russian debconf translation (Closes: #734426)
* Updated Japanese debconf translation (Closes: #735284)
* Updated French debconf translation (Closes: #736480)
* Renamed SONAME properly (Closes: #732967)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--source include/have_innodb.inc
2
 
 
3
1
# Initialise
4
2
--disable_warnings
5
3
drop table if exists t1,t2,t3;
1336
1334
   (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
1337
1335
 
1338
1336
let $query0=SELECT col1 AS field1, col1 AS field2
1339
 
            FROM t1 GROUP BY field1, field2;
 
1337
            FROM t1 GROUP BY field1, field2+0;
1340
1338
 
1341
1339
# Needs to be range to exercise bug
1342
1340
--eval EXPLAIN $query0;
1366
1364
 
1367
1365
explain
1368
1366
select col1 f1, col1 f2 from t1 order by f2, f1;
1369
 
select col1 f1, col1 f2 from t1 order by f2, f1;
 
1367
explain
 
1368
select col1 f1, col1 f2 from t1 order by f2, f1+0;
 
1369
select col1 f1, col1 f2 from t1 order by f2, f1+0;
1370
1370
 
1371
1371
explain
1372
1372
select col1 f1, col1 f2 from t1 group by f2 order by f2, f1;
1386
1386
   (11,10),(12,9),(13,8),(14,7),(15,6),(16,5),(17,4),(18,3),(19,2),(20,1);
1387
1387
 
1388
1388
explain
1389
 
select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3;
1390
 
select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3;
 
1389
select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3+0;
 
1390
select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3+0;
1391
1391
 
1392
1392
explain
1393
 
select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3;
1394
 
select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3;
 
1393
select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3+0;
 
1394
select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3+0;
1395
1395
 
1396
1396
DROP VIEW v1;
1397
1397
DROP TABLE t1, t2;
1593
1593
 
1594
1594
DROP TABLE t1,t2;
1595
1595
 
 
1596
--echo #
 
1597
--echo # MDEV-5104 crash in Item_field::used_tables with broken order by
 
1598
--echo #
 
1599
 
 
1600
--error ER_BAD_FIELD_ERROR
 
1601
(select 1 order by x(y)) order by 1;
 
1602
 
1596
1603
--echo # End of 5.3 tests
1597
1604
 
1598
1605
--echo #
1636
1643
 
1637
1644
DROP TABLE t1,t2;
1638
1645
 
1639
 
--echo #
1640
 
--echo # Test of MDEV-4002
1641
 
--echo #
1642
 
 
1643
 
CREATE TABLE t1 ( 
1644
 
  pk INT NOT NULL PRIMARY KEY, 
1645
 
  d1 DOUBLE, 
1646
 
  d2 DOUBLE, 
1647
 
  i INT NOT NULL DEFAULT '0',
1648
 
  KEY (i)
1649
 
) ENGINE=InnoDB;
1650
 
 
1651
 
INSERT INTO t1 VALUES (1,1.0,1.1,1),(2,2.0,2.2,2);
1652
 
 
1653
 
PREPARE stmt FROM " 
1654
 
SELECT DISTINCT i, GROUP_CONCAT(  d1, d2 ORDER BY d1, d2 ) 
1655
 
FROM t1 a1 NATURAL JOIN t1 a2 GROUP BY i WITH ROLLUP 
1656
 
";
1657
 
 
1658
 
EXECUTE stmt;
1659
 
EXECUTE stmt;
1660
 
 
1661
 
DROP TABLE t1;