summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_group.test
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-07-05 16:16:09 -0400
committerunknown <cmiller@zippy.(none)>2006-07-05 16:16:09 -0400
commit30de4903ae2b9cd03bd5f853715e7fc7b648c2c7 (patch)
treea0c67909c6e1a1b67caf4558144a68911d8dfb15 /mysql-test/t/func_group.test
parentf92fd7c98adad9542e7d8d29ee24db504980541f (diff)
parent2ef57b836248f945657c7bd0fe02fa7fe3660b54 (diff)
downloadmariadb-git-30de4903ae2b9cd03bd5f853715e7fc7b648c2c7.tar.gz
Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint BUILD/compile-dist: Auto merged BitKeeper/deleted/.del-partition_innodb.result: Auto merged BitKeeper/deleted/.del-partition_innodb.test: Auto merged client/mysqltest.c: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/create_not_windows.result: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/innodb_mysql.result: Auto merged mysql-test/r/partition.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/innodb_mysql.test: Auto merged mysql-test/t/partition.test: Auto merged mysql-test/t/ps_1general.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/wait_timeout.test: Auto merged mysys/my_lib.c: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/unireg.cc: Auto merged mysql-test/extra/rpl_tests/rpl_log.test: manuakl merge mysql-test/lib/mtr_process.pl: manuakl merge mysql-test/mysql-test-run.pl: manuakl merge mysql-test/r/type_newdecimal.result: manuakl merge mysql-test/t/create.test: manuakl merge mysql-test/t/func_group.test: manuakl merge mysql-test/t/type_newdecimal.test: manuakl merge
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r--mysql-test/t/func_group.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index eacc4fc6710..760745dc14e 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -546,6 +546,34 @@ DROP TABLE t1;
# Bug #12882 min/max inconsistent on empty table
#
# Test case moved to func_group_innodb
+#
+# Bug #18206: min/max optimization cannot be applied to partial index
+#
+
+CREATE TABLE t1 (id int PRIMARY KEY, b char(3), INDEX(b));
+INSERT INTO t1 VALUES (1,'xx'), (2,'aa');
+SELECT * FROM t1;
+
+SELECT MAX(b) FROM t1 WHERE b < 'ppppp';
+SHOW WARNINGS;
+SELECT MAX(b) FROM t1 WHERE b < 'pp';
+DROP TABLE t1;
+
+CREATE TABLE t1 (id int PRIMARY KEY, b char(16), INDEX(b(4)));
+INSERT INTO t1 VALUES (1, 'xxxxbbbb'), (2, 'xxxxaaaa');
+SELECT MAX(b) FROM t1;
+EXPLAIN SELECT MAX(b) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (id int , b varchar(512), INDEX(b(250))) COLLATE latin1_bin;
+INSERT INTO t1 VALUES
+ (1,CONCAT(REPEAT('_', 250), "qq")), (1,CONCAT(REPEAT('_', 250), "zz")),
+ (1,CONCAT(REPEAT('_', 250), "aa")), (1,CONCAT(REPEAT('_', 250), "ff"));
+
+SELECT MAX(b) FROM t1;
+EXPLAIN SELECT MAX(b) FROM t1;
+DROP TABLE t1;
+
# End of 4.1 tests
#