diff options
author | unknown <sanja@montyprogram.com> | 2012-03-14 13:58:18 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-03-14 13:58:18 +0200 |
commit | 5338a28912589f1169b66b880a489ec5636bcd83 (patch) | |
tree | d0e1156d56a95d2051d499b065d78395bc302528 /mysql-test/r/func_group.result | |
parent | 0f3b8ef28ed19145e0cd850ef522ddf7cf662592 (diff) | |
parent | e638e605895fb572047ec8027e91c5438d77cbf4 (diff) | |
download | mariadb-git-5338a28912589f1169b66b880a489ec5636bcd83.tar.gz |
Merge 5.2->5.3
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r-- | mysql-test/r/func_group.result | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index f1d3777e097..9c15af41799 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1887,6 +1887,53 @@ NULL NULL DROP TABLE t1,t2,t3; # +# Bug #884175: MIN/MAX for short varchar = long const +# +CREATE TABLE t1 (f1 varchar(1), f2 varchar(1), KEY (f2)); +INSERT INTO t1 VALUES ('b', 'b'), ('a','a'); +EXPLAIN +SELECT MAX(f1) FROM t1 WHERE f1 = 'abc'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +SELECT MAX(f1) FROM t1 WHERE f1 = 'abc'; +MAX(f1) +NULL +EXPLAIN +SELECT MAX(f2) FROM t1 WHERE f2 = 'abc'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref f2 f2 4 const 1 Using where; Using index +SELECT MAX(f2) FROM t1 WHERE f2 = 'abc'; +MAX(f2) +NULL +EXPLAIN +SELECT MIN(f1) FROM t1 WHERE f1 >= 'abc'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +SELECT MIN(f1) FROM t1 WHERE f1 >= 'abc'; +MIN(f1) +b +EXPLAIN +SELECT MIN(f2) FROM t1 WHERE f2 >= 'abc'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index f2 f2 4 NULL 2 Using where; Using index +SELECT MIN(f2) FROM t1 WHERE f2 >= 'abc'; +MIN(f2) +b +EXPLAIN +SELECT MIN(f1) FROM t1 WHERE f1 BETWEEN 'abc' AND 'b' ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +SELECT MIN(f1) FROM t1 WHERE f1 BETWEEN 'abc' AND 'b' ; +MIN(f1) +b +EXPLAIN +SELECT MIN(f2) FROM t1 WHERE f2 BETWEEN 'abc' AND 'b' ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index f2 f2 4 NULL 2 Using where; Using index +SELECT MIN(f2) FROM t1 WHERE f2 BETWEEN 'abc' AND 'b' ; +MIN(f2) +b +DROP TABLE t1; End of 5.2 tests # # BUG#46680 - Assertion failed in file item_subselect.cc, |