1
0
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:
Sergey Petrunya
2012-07-25 13:00:39 +04:00
parent 3956950b9f
commit 0b79fe2b30
3 changed files with 101 additions and 1 deletions

View File

@ -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;