summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-08-15 09:54:19 +0300
committermonty@mashka.mysql.fi <>2003-08-15 09:54:19 +0300
commita9146ace70a6bc56be969dc55830a875864bbd78 (patch)
tree8af6b315e91238a5e5102bbf069129cfc58554b0 /sql/opt_range.cc
parentfb47e642568139a58d8ac5598d9897fdb3ff1fa0 (diff)
downloadmariadb-git-a9146ace70a6bc56be969dc55830a875864bbd78.tar.gz
Cleanups to recent patches
Fix packet error when using wrong GRANT command
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index c7bad3b18f3..349a5d0271c 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -798,7 +798,8 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
table_map ref_tables=cond->used_tables();
if (cond->type() != Item::FUNC_ITEM)
{ // Should be a field
- if (ref_tables & param->current_table)
+ if ((ref_tables & param->current_table) ||
+ (ref_tables & ~(param->prev_tables | param->read_tables)))
DBUG_RETURN(0);
DBUG_RETURN(new SEL_TREE(SEL_TREE::MAYBE));
}