mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Replace 0.001 with symbolic name COST_EPS
optimize_straight_join and best_extension_by_limited_search() use 0.001 to make choice between plans with identical cost deterministic. Use COST_EPS instead of 0.001, like it's done in newer versions.
This commit is contained in:
@@ -9662,7 +9662,7 @@ optimize_straight_join(JOIN *join, table_map remaining_tables)
|
||||
memcpy((uchar*) join->best_positions, (uchar*) join->positions,
|
||||
sizeof(POSITION)*idx);
|
||||
join->join_record_count= record_count;
|
||||
join->best_read= read_time - 0.001;
|
||||
join->best_read= read_time - COST_EPS;
|
||||
}
|
||||
|
||||
|
||||
@@ -11093,7 +11093,7 @@ best_extension_by_limited_search(JOIN *join,
|
||||
memcpy((uchar*) join->best_positions, (uchar*) join->positions,
|
||||
sizeof(POSITION) * (idx + 1));
|
||||
join->join_record_count= partial_join_cardinality;
|
||||
join->best_read= current_read_time - 0.001;
|
||||
join->best_read= current_read_time - COST_EPS;
|
||||
}
|
||||
DBUG_EXECUTE("opt", print_plan(join, idx+1,
|
||||
current_record_count,
|
||||
|
Reference in New Issue
Block a user