Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
Description
optimizer today relies on empty or constant row table for several optimizations and also to even stop further execution of the query.
However, when the optimizer context is being replayed, the table being created at the reproducing site would often be empty. If the query execution is stopped abruptly, then we wouldn't be able to replay the context properly. So, we need to add a check to make sure this level of optimization is to be done only in non-replay mode.
Here are the pieces of code where the new check might have to be added: -
opt_range.cc|6023| if (table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) |
opt_sum.cc|73| or HA_STATS_RECORDS_IS_EXACT
|
opt_sum.cc|315| if (!(tl->table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) || |
sql_select.cc|5765| (table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT)) ||
|
sql_select.cc|5809| (table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT)) ||
|
sql_select.cc|5964| (table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) &&
|
sql_select.cc|25961| (jt->table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) &&
|
Attachments
Issue Links
- relates to
-
MDEV-38701 Optimizer Trace Replay: Q1 2026 Dev Sprint Work 1
-
- In Testing
-