summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-08-30 11:38:49 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-08-30 11:38:49 +0400
commit54e4516063c93c8f78ec99d37f3bda1aa22820a4 (patch)
tree29a2f71bf420dd6d81bf4c1c4232c900ed1779f0 /sql/opt_range.cc
parentf32c08bd0ca20d23e95ca46912044d48282cfd6f (diff)
parent6ce48392ea410ecb9937ea07943cc6434a5ac378 (diff)
downloadmariadb-git-54e4516063c93c8f78ec99d37f3bda1aa22820a4.tar.gz
Automerge.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 3e18d20c903..49a10f166fa 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -9639,7 +9639,17 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
*/
if (cond_type == Item::SUBSELECT_ITEM)
DBUG_RETURN(FALSE);
-
+
+ /*
+ Condition of the form 'field' is equivalent to 'field <> 0' and thus
+ satisfies the SA3 condition.
+ */
+ if (cond_type == Item::FIELD_ITEM)
+ {
+ DBUG_PRINT("info", ("Analyzing: %s", cond->full_name()));
+ DBUG_RETURN(TRUE);
+ }
+
/* We presume that at this point there are no other Items than functions. */
DBUG_ASSERT(cond_type == Item::FUNC_ITEM);