mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0-opt
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.1-opt
This commit is contained in:
@ -8874,7 +8874,7 @@ static TRP_GROUP_MIN_MAX *
|
||||
get_best_group_min_max(PARAM *param, SEL_TREE *tree)
|
||||
{
|
||||
THD *thd= param->thd;
|
||||
JOIN *join= thd->lex->select_lex.join;
|
||||
JOIN *join= thd->lex->current_select->join;
|
||||
TABLE *table= param->table;
|
||||
bool have_min= FALSE; /* TRUE if there is a MIN function. */
|
||||
bool have_max= FALSE; /* TRUE if there is a MAX function. */
|
||||
@ -8895,7 +8895,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
|
||||
DBUG_ENTER("get_best_group_min_max");
|
||||
|
||||
/* Perform few 'cheap' tests whether this access method is applicable. */
|
||||
if (!join || (thd->lex->sql_command != SQLCOM_SELECT))
|
||||
if (!join)
|
||||
DBUG_RETURN(NULL); /* This is not a select statement. */
|
||||
if ((join->tables != 1) || /* The query must reference one table. */
|
||||
((!join->group_list) && /* Neither GROUP BY nor a DISTINCT query. */
|
||||
@ -9736,7 +9736,7 @@ TRP_GROUP_MIN_MAX::make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
DBUG_ENTER("TRP_GROUP_MIN_MAX::make_quick");
|
||||
|
||||
quick= new QUICK_GROUP_MIN_MAX_SELECT(param->table,
|
||||
param->thd->lex->select_lex.join,
|
||||
param->thd->lex->current_select->join,
|
||||
have_min, have_max, min_max_arg_part,
|
||||
group_prefix_len, used_key_parts,
|
||||
index_info, index, read_cost, records,
|
||||
|
Reference in New Issue
Block a user