mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Merge from mysql-5.0-bugteam into mysql-5.1-bugteam
mysql-test/r/partition_not_windows.result: Update warning number due to new errors appearing earlier in the list. mysql-test/r/partition_symlink.result: Update warning number due to new errors appearing earlier in the list. mysql-test/r/symlink.result: Update warning number due to new errors appearing earlier in the list.
This commit is contained in:
commit
463c837c3a
7 changed files with 74 additions and 10 deletions
|
|
@ -1274,6 +1274,36 @@ tt
|
|||
41
|
||||
SET sql_mode=@save_sql_mode;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# BUG#38072: Wrong result: HAVING not observed in a query with aggregate
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
int_nokey int(11) NOT NULL,
|
||||
int_key int(11) NOT NULL,
|
||||
varchar_key varchar(1) NOT NULL,
|
||||
varchar_nokey varchar(1) NOT NULL,
|
||||
PRIMARY KEY (pk),
|
||||
KEY int_key (int_key),
|
||||
KEY varchar_key (varchar_key)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1,5,5, 'h','h'),
|
||||
(2,1,1, '{','{'),
|
||||
(3,1,1, 'z','z'),
|
||||
(4,8,8, 'x','x'),
|
||||
(5,7,7, 'o','o'),
|
||||
(6,3,3, 'p','p'),
|
||||
(7,9,9, 'c','c'),
|
||||
(8,0,0, 'k','k'),
|
||||
(9,6,6, 't','t'),
|
||||
(10,0,0,'c','c');
|
||||
explain SELECT COUNT(varchar_key) AS X FROM t1 WHERE pk = 8 having 'foo'='bar';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
|
||||
SELECT COUNT(varchar_key) AS X FROM t1 WHERE pk = 8 having 'foo'='bar';
|
||||
X
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1 (a INT, b INT,
|
||||
PRIMARY KEY (a),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue