summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_group.result
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2011-09-08 16:57:46 +0300
committerunknown <sanja@askmonty.org>2011-09-08 16:57:46 +0300
commitb80641b36cb43206a118ee84fccd90d08fbb8df4 (patch)
tree711d4c248c7ab3622b2acdbd2f48d35b734e0a7f /mysql-test/r/func_group.result
parent8b062c1fefd14cfa22e625d098b92c8ac3c1b28f (diff)
downloadmariadb-git-b80641b36cb43206a118ee84fccd90d08fbb8df4.tar.gz
LP BUG#813418 fix.
The problem was that optimization code did not take into account later feature when instad of NOT before BETWEEN it has negated flag into the Item_func_between inherited from Item_func_neg_opt. So optimizer tried process NOT BETWEEN as BETWEEN. The patch just switches off the optimisation for NOT BETWEEN as it was before when NOT function was really used.
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r--mysql-test/r/func_group.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index b90eb2a4c0f..2ff1cd2ec4a 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1758,3 +1758,13 @@ MAX(f1)
DROP TABLE t1;
#
End of 5.1 tests
+# LP BUG#813418 - incorrect optimisation of max/min by index for
+# negated BETWEEN
+CREATE TABLE t1 (a int, KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+SELECT MAX(a) FROM t1 WHERE a NOT BETWEEN 3 AND 9;
+MAX(a)
+10
+drop table t1;
+#
+End of 5.1 tests