diff options
author | unknown <igor@rurik.mysql.com> | 2006-04-06 15:29:15 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-04-06 15:29:15 -0700 |
commit | 998b9d8b14892a91ad32fd1be83f9d60fddba98d (patch) | |
tree | 125a1e037e2b10337945e300958855f608950261 /mysql-test/r | |
parent | 8ec7190dacbbc8dbdd2c985b22991a20be720a47 (diff) | |
download | mariadb-git-998b9d8b14892a91ad32fd1be83f9d60fddba98d.tar.gz |
Fixed bug #15917: unexpected complain for a NIST test case.
The problem was due to the fact that with --lower-case-table-names set to 1
the function find_field_in_group did not convert the prefix 'HU' in
HU.PROJ.CITY into lower case when looking for it in the group list. Yet the
names in the group list were extended by the database name in lower case.
mysql-test/r/having.result:
Added a test case for bug #15917.
mysql-test/t/having.test:
Added a test case for bug #15917.
sql/item.cc:
Fixed bug #15917: unexpected complain for a NIST test case.
The problem was due to the fact that with --lower-case-table-names set to 1
the function find_field_in_group did not convert the prefix 'HU' in
HU.PROJ.CITY into lower case when looking for it in the group list. Yet the
names in the group list were extended by the database name in lower case.
The needed conversion was added to the code of find_field_in_group.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/having.result | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index 225d5a475ff..c827e11e50e 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -359,3 +359,38 @@ group by s1 collate latin1_swedish_ci having s1 = 'y'; s1 count(s1) y 1 drop table t1; +DROP SCHEMA IF EXISTS HU; +Warnings: +Note 1008 Can't drop database 'HU'; database doesn't exist +CREATE SCHEMA HU ; +USE HU ; +CREATE TABLE STAFF +(EMPNUM CHAR(3) NOT NULL UNIQUE, +EMPNAME CHAR(20), +GRADE DECIMAL(4), +CITY CHAR(15)); +CREATE TABLE PROJ +(PNUM CHAR(3) NOT NULL UNIQUE, +PNAME CHAR(20), +PTYPE CHAR(6), +BUDGET DECIMAL(9), +CITY CHAR(15)); +INSERT INTO STAFF VALUES ('E1','Alice',12,'Deale'); +INSERT INTO STAFF VALUES ('E2','Betty',10,'Vienna'); +INSERT INTO STAFF VALUES ('E3','Carmen',13,'Vienna'); +INSERT INTO STAFF VALUES ('E4','Don',12,'Deale'); +INSERT INTO STAFF VALUES ('E5','Ed',13,'Akron'); +INSERT INTO PROJ VALUES ('P1','MXSS','Design',10000,'Deale'); +INSERT INTO PROJ VALUES ('P2','CALM','Code',30000,'Vienna'); +INSERT INTO PROJ VALUES ('P3','SDP','Test',30000,'Tampa'); +INSERT INTO PROJ VALUES ('P4','SDP','Design',20000,'Deale'); +INSERT INTO PROJ VALUES ('P5','IRM','Test',10000,'Vienna'); +INSERT INTO PROJ VALUES ('P6','PAYR','Design',50000,'Deale'); +SELECT EMPNUM, GRADE*1000 +FROM HU.STAFF WHERE GRADE * 1000 > +ANY (SELECT SUM(BUDGET) FROM HU.PROJ +GROUP BY CITY, PTYPE +HAVING HU.PROJ.CITY = HU.STAFF.CITY); +EMPNUM GRADE*1000 +E3 13000 +DROP SCHEMA HU; |