mirror of
https://github.com/MariaDB/server.git
synced 2025-12-22 23:02:58 +03:00
There is an optimization of DISTINCT in JOIN::optimize() which depends on THD::used_tables value. Each SELECT statement inside SP resets used_tables value(see mysql_select()) and it leads to wrong result. The fix is to replace THD::used_tables with LEX::used_tables.
99 KiB
99 KiB