diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 13:00:33 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 13:00:33 +0100 |
commit | 745c53ec06794c4faaf0c9c3f9a1bf4ffc3f0759 (patch) | |
tree | 560abf8d5af4977dcacbce07a9502cb84d6bb003 /sql/opt_range.cc | |
parent | 63d32c115dd962b53cf7bcaa340472ee2f44f9e2 (diff) | |
parent | 6404504d0c10d58ad5861bdb72edd54508f1364c (diff) | |
download | mariadb-git-745c53ec06794c4faaf0c9c3f9a1bf4ffc3f0759.tar.gz |
5.2->5.3 merge
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 0ad77a4861d..8d4b2e971ad 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -11607,6 +11607,8 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree) DBUG_RETURN(NULL); if (table->s->keys == 0) /* There are no indexes to use. */ DBUG_RETURN(NULL); + if (join->conds && join->conds->used_tables() & OUTER_REF_TABLE_BIT) + DBUG_RETURN(NULL); /* Cannot execute with correlated conditions. */ /* Analyze the query in more detail. */ List_iterator<Item> select_items_it(join->fields_list); @@ -12916,6 +12918,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void) int result; DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::reset"); + seen_first_key= FALSE; if (!head->key_read) { doing_key_read= 1; |