1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge magare.gmz:/home/kgeorge/mysql/work/B30377-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/work/B30377-5.1-opt
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-08-29 11:38:05 +03:00
4 changed files with 107 additions and 1 deletions

View File

@ -4505,8 +4505,12 @@ choose_plan(JOIN *join, table_map join_tables)
/*
Store the cost of this query into a user variable
Don't update last_query_cost for statements that are not "flat joins" :
i.e. they have subqueries, unions or call stored procedures.
TODO: calculate a correct cost for a query with subqueries and UNIONs.
*/
join->thd->status_var.last_query_cost= join->best_read;
if (join->thd->lex->is_single_level_stmt())
join->thd->status_var.last_query_cost= join->best_read;
DBUG_RETURN(FALSE);
}