mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-412: SHOW EXPLAIN: Server crashes in JOIN::print_explain on a query with inner join and ORDER BY the same column twice
- JOIN::print_explain should print pre_sort_join_tab instead of "first non-constant table". The code didn't take the "non-constant" part into account.
This commit is contained in:
@ -21626,7 +21626,7 @@ int JOIN::print_explain(select_result_sink *result, uint8 explain_flags,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tab == first_top_tab && pre_sort_join_tab)
|
||||
if (tab == (first_top_tab + join->const_tables) && pre_sort_join_tab)
|
||||
{
|
||||
saved_join_tab= tab;
|
||||
tab= pre_sort_join_tab;
|
||||
|
Reference in New Issue
Block a user