List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:January 13 2011 1:13pm
Subject:bzr push into mysql-next-mr-bugfixing branch (guilhem.bichot:3250 to 3251)
View as plain text  
 3251 Guilhem Bichot	2011-01-13
      less code duplication

    modified:
      sql/opt_range.cc
 3250 Guilhem Bichot	2011-01-12
      review comments, patch from Tor (only indentation changes due to one scope
      deleted; the changes to the "cause" were in the previous commit).

    modified:
      sql/opt_range.cc
=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2011-01-12 21:17:26 +0000
+++ b/sql/opt_range.cc	2011-01-13 13:12:27 +0000
@@ -10110,23 +10110,16 @@ get_best_group_min_max(PARAM *param, SEL
 
   /* Perform few 'cheap' tests whether this access method is applicable. */
   if (!join)
+    cause= "no_join";
+  else if (join->tables != 1)   /* The query must reference one table. */
+    cause= "not_single_table";
+  else if (join->select_lex->olap == ROLLUP_TYPE) /* Check (B3) for ROLLUP */
+    cause= "rollup";
+  else if (table->s->keys == 0)        /* There are no indexes to use. */
+    cause= "no_index";
+  if (cause != NULL)
   {
-    trace_group.add("chosen", false).add_alnum("cause", "no_join");
-    DBUG_RETURN(NULL);
-  }
-  if (join->tables != 1)   /* The query must reference one table. */
-  {
-    trace_group.add("chosen", false).add_alnum("cause", "not_single_table");
-    DBUG_RETURN(NULL);
-  }
-  if (join->select_lex->olap == ROLLUP_TYPE) /* Check (B3) for ROLLUP */
-  {
-    trace_group.add("chosen", false).add_alnum("cause", "rollup");
-    DBUG_RETURN(NULL);
-  }
-  if (table->s->keys == 0)        /* There are no indexes to use. */
-  {
-    trace_group.add("chosen", false).add_alnum("cause", "no_index");
+    trace_group.add("chosen", false).add_alnum("cause", cause);
     DBUG_RETURN(NULL);
   }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-next-mr-bugfixing branch (guilhem.bichot:3250 to 3251) Guilhem Bichot13 Jan