summaryrefslogtreecommitdiff
path: root/mysql-test/t/range.test
diff options
context:
space:
mode:
authorunknown <kaa@kaamos.(none)>2008-02-13 12:12:00 +0300
committerunknown <kaa@kaamos.(none)>2008-02-13 12:12:00 +0300
commit91123903145baffbfdc4a864ef02f1f0b6b66744 (patch)
tree32093b4d9c9eff7578d39bb14fee8bbbdcf1dc4b /mysql-test/t/range.test
parent00b17696efc6e4ffc70abdbea4b76b88b397b910 (diff)
parentc6610b57912ba010acf9ead06095309bf71f7c96 (diff)
downloadmariadb-git-91123903145baffbfdc4a864ef02f1f0b6b66744.tar.gz
Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into kaamos.(none):/data/src/opt/mysql-5.1-opt mysql-test/r/heap.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/myisam.result: Auto merged BitKeeper/deleted/.del-bdb.result: Auto merged mysql-test/r/strict.result: Auto merged mysql-test/r/type_binary.result: Auto merged mysql-test/r/type_set.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/r/warnings.result: Auto merged mysql-test/t/range.test: Auto merged mysql-test/t/variables.test: Auto merged mysql-test/t/warnings.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_func.cc: Auto merged sql/sql_select.cc: Auto merged sql/mysqld.cc: Null merge. mysql-test/include/mix1.inc: Manual merge. mysql-test/r/innodb_mysql.result: Manual merge. mysql-test/r/range.result: Manual merge. mysql-test/r/sp.result: Manual merge. mysql-test/t/sp.test: Manual merge. sql/handler.cc: Manual merge.
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r--mysql-test/t/range.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index e20f0370e2c..514e3074292 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -955,6 +955,23 @@ explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= '
drop table t1;
+#
+# Bug #33833: different or-ed predicates were erroneously merged into one that
+# resulted in ref access instead of range access and a wrong result set
+#
+
+CREATE TABLE t1 (
+ a varchar(32), index (a)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
+
+INSERT INTO t1 VALUES
+ ('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A');
+
+SELECT a FROM t1 WHERE a='b' OR a='B';
+EXPLAIN SELECT a FROM t1 WHERE a='b' OR a='B';
+
+DROP TABLE t1;
+
# End of 5.0 tests
# BUG#22393 fix: Adjust 'ref' estimate if we have 'range' estimate for