[Commits] Rev 3160: Fix for previous csets: let set_explain_type() produce correct types for "UNION RESULT" selects in file:///home/psergey/dev2/5.3-show-explain-r2/

Sergey Petrunya psergey at askmonty.org
Fri Aug 26 15:04:34 EEST 2011


At file:///home/psergey/dev2/5.3-show-explain-r2/

------------------------------------------------------------
revno: 3160
revision-id: psergey at askmonty.org-20110826120430-qsaeepng3qmqf9kw
parent: psergey at askmonty.org-20110825090409-zler3f2dc1ze3tfe
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.3-show-explain-r2
timestamp: Fri 2011-08-26 16:04:30 +0400
message:
  Fix for previous csets: let set_explain_type() produce correct types for "UNION RESULT" selects
=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2011-08-24 10:41:13 +0000
+++ b/sql/sql_lex.cc	2011-08-26 12:04:30 +0000
@@ -3520,7 +3520,7 @@
           ((is_uncacheable & UNCACHEABLE_DEPENDENT) ?
            "DEPENDENT UNION":
            is_uncacheable ? "UNCACHEABLE UNION":
-           "UNION")));
+           (this == master_unit()->fake_select_lex)? "UNION RESULT" : "UNION")));
   options|= SELECT_DESCRIBE;
 }
 

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-08-24 10:41:13 +0000
+++ b/sql/sql_select.cc	2011-08-26 12:04:30 +0000
@@ -20503,7 +20503,7 @@
            join->select_lex->master_unit()->derived->is_materialized_derived())
   {
     table_map used_tables=0;
-    join->select_lex->set_explain_type(); //psergey
+    join->select_lex->set_explain_type(); //psergey-todo: this adds SELECT_DESCRIBE to options! bad for on-the-fly 
 
     bool printing_materialize_nest= FALSE;
     uint select_id= join->select_lex->select_number;



More information about the commits mailing list