diff options
author | unknown <gkodinov@dl145s.mysql.com> | 2006-10-19 16:43:46 +0200 |
---|---|---|
committer | unknown <gkodinov@dl145s.mysql.com> | 2006-10-19 16:43:46 +0200 |
commit | fcbf1509e22e9c27910d5beacb6d105e81d2a6b3 (patch) | |
tree | 1d4b8a5dec4c6f52e2b5a119df93d2225083cb70 /mysql-test/t/group_by.test | |
parent | f4f15b54351dcb02bbe99251e2fbab5317c95ee6 (diff) | |
parent | 5e1fe0f80043993c1db64169e4d87eb787762763 (diff) | |
download | mariadb-git-fcbf1509e22e9c27910d5beacb6d105e81d2a6b3.tar.gz |
Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
BitKeeper/deleted/.del-bdb.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
include/my_base.h:
SCCS merged
mysql-test/include/mix1.inc:
SCCS merged
mysql-test/r/group_by.result:
SCCS merged
mysql-test/r/innodb_mysql.result:
SCCS merged
mysql-test/t/group_by.test:
SCCS merged
sql/sql_select.cc:
SCCS merged
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r-- | mysql-test/t/group_by.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 8a514108dc3..7f887335753 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -609,6 +609,30 @@ select sql_buffer_result max(f1) is null from t1; select sql_buffer_result max(f1)+1 from t1; drop table t1; +# +# BUG#14019-4.1-opt +# +CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1),(2); + +SELECT a FROM t1 GROUP BY 'a'; +SELECT a FROM t1 GROUP BY "a"; +SELECT a FROM t1 GROUP BY `a`; + +set sql_mode=ANSI_QUOTES; +SELECT a FROM t1 GROUP BY "a"; +SELECT a FROM t1 GROUP BY 'a'; +SELECT a FROM t1 GROUP BY `a`; +set sql_mode=''; + +SELECT a FROM t1 HAVING 'a' > 1; +SELECT a FROM t1 HAVING "a" > 1; +SELECT a FROM t1 HAVING `a` > 1; + +SELECT a FROM t1 ORDER BY 'a' DESC; +SELECT a FROM t1 ORDER BY "a" DESC; +SELECT a FROM t1 ORDER BY `a` DESC; +DROP TABLE t1; + # End of 4.1 tests # @@ -657,6 +681,28 @@ DROP VIEW v1; DROP TABLE t1,t2; # +# Bug#22781: SQL_BIG_RESULT fails to influence sort plan +# +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, key (b)); + +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20) FROM t1; +INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20) FROM t1; +INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20) FROM t1; +INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20) FROM t1; +INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20) FROM t1; +INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20) FROM t1; +INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20) FROM t1; + +SELECT MIN(b), MAX(b) from t1; + +EXPLAIN SELECT b, sum(1) FROM t1 GROUP BY b; +EXPLAIN SELECT SQL_BIG_RESULT b, sum(1) FROM t1 GROUP BY b; +SELECT b, sum(1) FROM t1 GROUP BY b; +SELECT SQL_BIG_RESULT b, sum(1) FROM t1 GROUP BY b; +DROP TABLE t1; + +# # Bug #21174: Index degrades sort performance and # optimizer does not honor IGNORE INDEX # |