Hello,
The print_plan() function (sql_test.cc) has this form:
print_plan(JOIN* join, uint idx, double record_count, double read_time,
double current_read_time, const char *info)
but one call to it, located at the start of
best_extension_by_limited_search() in MySQL 5.1, is:
DBUG_EXECUTE("opt", print_plan(join, idx, read_time, record_count, idx,
"SOFAR:"););
This looks weird, because it seems to have swapped variables (local
variable "record_count" is used for print_plan()'s parameter
"read_time", and vice-versa). Another weirdness: it uses local variable
"idx" (=join->const_tables in this case) for print_plan()'s parameter
"current_read_time".
I wonder if this is really a correct call.
--
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com