From bc98177aaae71b139c738ef6fa3ed99fb16fce45 Mon Sep 17 00:00:00 2001 From: "serg@build.mysql.com" <> Date: Sat, 17 Jul 2004 16:15:32 +0200 Subject: [PATCH] sql_select.cc: if many plans have identical cost, which one will be used depends on how compiler optimizes floating-point calculations this fix adds repeatability to the optimizer --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index db5c933545b..328fd4f9976 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3614,7 +3614,7 @@ best_extension_by_limited_search(JOIN *join, { memcpy((gptr) join->best_positions, (gptr) join->positions, sizeof(POSITION) * (idx + 1)); - join->best_read= current_read_time; + join->best_read= current_read_time - 0.001; } DBUG_EXECUTE("opt", print_plan(join, current_read_time, current_record_count, idx, "full_plan"););