diff options
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/group_by.result | 30 | ||||
-rw-r--r-- | mysql-test/r/partition_not_windows.result | 4 | ||||
-rw-r--r-- | mysql-test/r/partition_symlink.result | 4 | ||||
-rw-r--r-- | mysql-test/r/symlink.result | 10 |
4 files changed, 39 insertions, 9 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 30c4d1e4ca1..12e1460e128 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -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), diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index c0247babb50..cf1fec98b07 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -24,8 +24,8 @@ data directory='/not/existing' index directory='/not/existing' ); Warnings: -Warning 1616 <DATA DIRECTORY> option ignored -Warning 1616 <INDEX DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored +Warning 1618 <INDEX DIRECTORY> option ignored show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/r/partition_symlink.result b/mysql-test/r/partition_symlink.result index 00c9f5b3f01..894966f6c53 100644 --- a/mysql-test/r/partition_symlink.result +++ b/mysql-test/r/partition_symlink.result @@ -101,8 +101,8 @@ data directory='/not/existing' index directory='/not/existing' ); Warnings: -Warning 1616 <DATA DIRECTORY> option ignored -Warning 1616 <INDEX DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored +Warning 1618 <INDEX DIRECTORY> option ignored show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index df4aa343f1f..7711517fe5e 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -79,7 +79,7 @@ drop database mysqltest; create table t1 (a int not null) engine=myisam; alter table t1 data directory="MYSQLTEST_VARDIR/tmp"; Warnings: -Warning 1616 <DATA DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -88,7 +88,7 @@ t1 CREATE TABLE `t1` ( alter table t1 add b int; alter table t1 data directory="MYSQLTEST_VARDIR/log"; Warnings: -Warning 1616 <DATA DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -97,7 +97,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 index directory="MYSQLTEST_VARDIR/log"; Warnings: -Warning 1616 <INDEX DIRECTORY> option ignored +Warning 1618 <INDEX DIRECTORY> option ignored show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -164,8 +164,8 @@ ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errco SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE'; CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp'; Warnings: -Warning 1616 <DATA DIRECTORY> option ignored -Warning 1616 <INDEX DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored +Warning 1618 <INDEX DIRECTORY> option ignored DROP TABLE t1; SET @@SQL_MODE=@OLD_SQL_MODE; End of 5.1 tests |