~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/r/group_by.result

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
1790
1790
1       10      1
1791
1791
DROP TABLE t1, t2;
1792
1792
#
 
1793
# Bug#52051: Aggregate functions incorrectly returns NULL from outer
 
1794
# join query
 
1795
#
 
1796
CREATE TABLE t1 (a INT PRIMARY KEY);
 
1797
CREATE TABLE t2 (a INT PRIMARY KEY);
 
1798
INSERT INTO t2 VALUES (1), (2);
 
1799
EXPLAIN SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
 
1800
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
1801
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Select tables optimized away
 
1802
SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
 
1803
MIN(t2.a)
 
1804
1
 
1805
EXPLAIN SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
 
1806
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
1807
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Select tables optimized away
 
1808
SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
 
1809
MAX(t2.a)
 
1810
2
 
1811
DROP TABLE t1, t2;
 
1812
#
1793
1813
# End of 5.1 tests