[Commits] b8a9564: MDEV-8646: Re-factor the code for working tables

Sergei Petrunia psergey at askmonty.org
Sun Dec 27 17:03:33 EET 2015


revision-id: b8a9564a366da36953b2e1532e3c1fb5152ecfb9
parent(s): 117bcd57f4032bfe54a09ee1e0219af29ec9cdcf
committer: Sergei Petrunia
branch nick: 10.1-mdev8646
timestamp: 2015-12-28 02:03:32 +1100
message:

MDEV-8646: Re-factor the code for working tables

- Fix derived_opt test: JOIN_TAB::save_explain_data should read
  tab->shortcut_for_distinct to determine whether "Distinct" optimization
  should be used.

---
 sql/sql_select.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 2b8a4e0..73b70db 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -23792,7 +23792,7 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta, table_map prefix_tab
         eta->push_extra(ET_USING_MRR);
     }
 
-    if (distinct & test_all_bits(prefix_tables, join->select_list_used_tables))
+    if (tab->shortcut_for_distinct)
       eta->push_extra(ET_DISTINCT);
     if (tab->loosescan_match_tab)
     {


More information about the commits mailing list