From 0afed4c3eb914788528087405022878a2ef5bc95 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 3 Nov 2004 15:22:33 +0400 Subject: opt_range.cc, range.result, range.test: Bug #6045: Binary Comparison regression in MySQL 4.1 Binary searches didn't use a case insensitive index, now they do. mysql-test/t/range.test: Bug #6045: Binary Comparison regression in MySQL 4.1 Binary searches didn't use a case insensitive index, now they do. mysql-test/r/range.result: Bug #6045: Binary Comparison regression in MySQL 4.1 Binary searches didn't use a case insensitive index, now they do. sql/opt_range.cc: Bug #6045: Binary Comparison regression in MySQL 4.1 Binary searches didn't use a case insensitive index, now they do. --- mysql-test/t/range.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/t/range.test') diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index cd6620f7126..44f55da5722 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -431,3 +431,17 @@ select count(*) from t1 where x = 18446744073709551601; drop table t1; +# +# Bug #6045: Binary Comparison regression in MySQL 4.1 +# Binary searches didn't use a case insensitive index. +# +set names latin1; +create table t1 (a char(10), b text, key (a)) character set latin1; +INSERT INTO t1 (a) VALUES +('111'),('222'),('222'),('222'),('222'),('444'),('aaa'),('AAA'),('bbb'); +# all these three can be optimized +explain select * from t1 where a='aaa'; +explain select * from t1 where a=binary 'aaa'; +explain select * from t1 where a='aaa' collate latin1_bin; +# this one cannot: +explain select * from t1 where a='aaa' collate latin1_german1_ci; -- cgit v1.2.1