List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:September 12 2008 2:59pm
Subject:bzr push into mysql-6.0-opt branch (sergefp:2690 to 2691)
View as plain text  
 2691 Sergey Petrunia	2008-09-12
      BUG:#37851: Crash in test_if_skip_sort_order tab->select is zero
      - Fix pushbuild test failure. It has turned out there are cases where
tab->select->cond
        is used by filesort.
modified:
  sql/sql_select.cc

 2690 Sergey Petrunia	2008-09-10
      BUG#36896: Server crash on SELECT FROM DUAL
      - Disable semi-join and materialization if subquery's parent select is a
        confluent SELECT ... FROM DUAL:
         = Semi-join runtime cannot handle semi-joins w/o outer tables
         = Materialization relies on parent select calling
setup_subquery_materialization()
           before trying to evaluate subquery items. SELECT ... FROM dual buypasses many
           steps in join execution and doesn't meet this requirement.
         And it's not worth making SELECT ... FROM dual able to work with materialization
         because there's no benefit to use materialization if the subquery predicate will
         be evaluated only once. (it is possible to construct cases where it will be
evaluated
         many times but they are not practially important)
modified:
  mysql-test/r/ps_ddl.result
  mysql-test/r/subselect3.result
  mysql-test/t/ps_ddl.test
  mysql-test/t/subselect3.test
  sql/sql_select.cc

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2008-09-10 10:08:37 +0000
+++ b/sql/sql_select.cc	2008-09-12 12:58:42 +0000
@@ -15917,7 +15917,11 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
       if (table->covering_keys.is_set(ref_key))
 	usable_keys.intersect(table->covering_keys);
       if (tab->pre_idx_push_select_cond)
+      {
         tab->select_cond= tab->pre_idx_push_select_cond;
+        if (tab->select)
+          tab->select->cond= tab->select_cond;
+      }
       if ((new_ref_key= test_if_subkey(order, table, ref_key, ref_key_parts,
 				       &usable_keys)) < MAX_KEY)
       {
@@ -16177,7 +16181,11 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
             table->file->extra(HA_EXTRA_KEYREAD);
           }
           if (tab->pre_idx_push_select_cond)
+          {
+            if (tab->select)
+              tab->select->cond= tab->select_cond;
             tab->select_cond= tab->pre_idx_push_select_cond;
+          }
           table->file->ha_index_or_rnd_end();
           if (join->select_options & SELECT_DESCRIBE)
           {

Thread
bzr push into mysql-6.0-opt branch (sergefp:2690 to 2691)Sergey Petrunia12 Sep