List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:December 21 2005 8:41am
Subject:bk commit into 5.1 tree (sergefp:1.1973)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1973 05/12/21 11:41:36 sergefp@stripped +1 -0
  WL#2985 "Paritition pruning" post fixes: Make table->reginfo.impossible_ranges to be set to FALSE for all "const" tables.

  sql/sql_select.cc
    1.378 05/12/21 11:41:29 sergefp@stripped +6 -4
    WL#2985 "Paritition pruning" post fixes:
     * Make table->reginfo.impossible_ranges to be set to FALSE for all "const" tables.
     * Rename a label

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-5.1-ppruning-merge

--- 1.377/sql/sql_select.cc	2005-12-21 10:15:07 +03:00
+++ 1.378/sql/sql_select.cc	2005-12-21 11:41:29 +03:00
@@ -2004,6 +2004,7 @@
     table->quick_keys.clear_all();
     table->reginfo.join_tab=s;
     table->reginfo.not_exists_optimize=0;
+    table->reginfo.impossible_range= FALSE;
     bzero((char*) table->const_key_parts, sizeof(key_part_map)*table->s->keys);
     all_table_map|= table->map;
     s->join=join;
@@ -2245,14 +2246,13 @@
 
     if (!s->table->pos_in_table_list->embedding)
     {
-      s->table->reginfo.impossible_range= FALSE;
 #ifdef WITH_PARTITION_STORAGE_ENGINE
       Item *pprune_cond= *s->on_expr_ref ? *s->on_expr_ref : conds;
       if (prune_partitions(join->thd, s->table, pprune_cond, 
                            found_const_table_map))
       {
         s->table->reginfo.impossible_range= TRUE;
-        goto impossible_range;  //Dont attempt range optimization
+        goto got_impossible_range;  //Dont attempt range optimization
       }
 #endif
       if (!s->const_keys.is_clear_all())
@@ -2279,7 +2279,7 @@
       }
       if (s->table->reginfo.impossible_range)
       {
-        impossible_range:
+        got_impossible_range:
         /*
           Impossible WHERE or ON expression
           In case of ON, we mark that the we match one empty NULL row.
@@ -5291,11 +5291,13 @@
              ctab < join->join_tab + join->const_tables; ctab++)
         {
           if (!(*ctab->on_expr_ref) && ctab->table->reginfo.impossible_range)
+          {
             const_cond_is_false= TRUE;
+            break;
+          }
         }
         if (const_cond_is_false || (const_cond && !const_cond->val_int()))
         {
-	  DBUG_PRINT("info",("Found impossible WHERE condition"));
 	  DBUG_RETURN(1);	 // Impossible const condition
         }
       }
Thread
bk commit into 5.1 tree (sergefp:1.1973)Sergey Petrunia21 Dec