[Commits] Rev 3759: MDEV-83 in file:///home/psergey/dev2/10.0-mdev83/

Sergey Petrunya psergey at askmonty.org
Fri Dec 20 16:26:48 EET 2013


At file:///home/psergey/dev2/10.0-mdev83/

------------------------------------------------------------
revno: 3759
revision-id: psergey at askmonty.org-20131220142647-dp3e9n1itvi4wti5
parent: psergey at askmonty.org-20131219025028-7p4px5iq3s3j5vd8
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 10.0-mdev83
timestamp: Fri 2013-12-20 18:26:47 +0400
message:
  MDEV-83
  - Remove POSITION::least_card_pos, as it is redundant.
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2013-12-19 02:50:28 +0000
+++ b/sql/sql_select.cc	2013-12-20 14:26:47 +0000
@@ -24535,6 +24535,7 @@ double JOIN::static_pushdown_cost(uint i
   List_iterator<Item> it(preds);
   Item *cur_item;
   double pushed_cond_cost= 0;
+  POSITION *least_card_pos[MAX_TABLES];
 
   /*
     For each POSITION, find and store the POSITION with the least partial
@@ -24547,7 +24548,7 @@ double JOIN::static_pushdown_cost(uint i
     if (!min_pos ||
         p_pos->partial_join_cardinality <= min_pos->partial_join_cardinality)
       min_pos= p_pos;
-    p_pos->least_card_pos= min_pos;
+    least_card_pos[p_pos - positions]= min_pos;
   }
 
   /* Turn the WHERE clause into a uniform list representation. */
@@ -24587,7 +24588,7 @@ double JOIN::static_pushdown_cost(uint i
       continue; /* cur_item depends only on constant tables */
 
     /* The optimal position with least cardinality where to push cur_item. */
-    opt_pos= last_pos->least_card_pos;
+    opt_pos= least_card_pos[last_pos - positions];
 
     /*
       Update the cost of the POSITION as if cur_item will be pushed to the

=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2013-11-08 12:36:02 +0000
+++ b/sql/sql_select.h	2013-12-20 14:26:47 +0000
@@ -788,8 +788,6 @@ typedef struct st_position :public Sql_a
 {
   /* The table that's put into join order */
   JOIN_TAB *table;
-  /*  The JOIN_TAB after this one with the least partial join cardinality */
-  st_position *least_card_pos;
 
   /*
     The "fanout": number of output rows that will be produced (after



More information about the commits mailing list