Commit bc98177a authored by serg@build.mysql.com's avatar serg@build.mysql.com

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
parent b93aa71d
...@@ -3614,7 +3614,7 @@ best_extension_by_limited_search(JOIN *join, ...@@ -3614,7 +3614,7 @@ best_extension_by_limited_search(JOIN *join,
{ {
memcpy((gptr) join->best_positions, (gptr) join->positions, memcpy((gptr) join->best_positions, (gptr) join->positions,
sizeof(POSITION) * (idx + 1)); sizeof(POSITION) * (idx + 1));
join->best_read= current_read_time; join->best_read= current_read_time - 0.001;
} }
DBUG_EXECUTE("opt", DBUG_EXECUTE("opt",
print_plan(join, current_read_time, current_record_count, idx, "full_plan");); print_plan(join, current_read_time, current_record_count, idx, "full_plan"););
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment