diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 21:48:47 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 21:48:47 +0100 |
commit | c4341d50950224bb4e976fd1aac23dddc7d78f71 (patch) | |
tree | 9fa2f700cbe0283ffaf3d7da57238fb4f7e96e25 /sql/opt_range.cc | |
parent | 0d55ebc05ea303a9aea44d953abbc335c12c9330 (diff) | |
parent | 5dec570d7c1e2a39b67503a90d2d7905ac4dbb44 (diff) | |
download | mariadb-git-c4341d50950224bb4e976fd1aac23dddc7d78f71.tar.gz |
5.2 -> 5.3
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 29f3945d163..df1d691ca58 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -11806,6 +11806,13 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree) else goto next_index; } + /* + This function is called on the precondition that the index is covering. + Therefore if the GROUP BY list contains more elements than the index, + these are duplicates. The GROUP BY list cannot be a prefix of the index. + */ + if (cur_part == end_part && tmp_group) + goto next_index; } /* Check (GA2) if this is a DISTINCT query. |