From: Martin Hansson Date: June 17 2011 8:57am Subject: bzr commit into mysql-trunk branch (martin.hansson:3219) WL#5855 List-Archive: http://lists.mysql.com/commits/139480 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1029467282==" --===============1029467282== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///data0/martin/bzrroot/wl5855/mysql-trunk-work/ based on revid:jon.hauglid@stripped 3219 Martin Hansson 2011-06-17 wl#5855: Removed the st_join_table typedef. modified: sql/item_cmpfunc.h sql/item_subselect.h sql/records.h sql/sql_select.cc sql/sql_select.h sql/structs.h sql/table.h === modified file 'sql/item_cmpfunc.h' --- a/sql/item_cmpfunc.h 2011-06-09 06:22:39 +0000 +++ b/sql/item_cmpfunc.h 2011-06-17 08:57:08 +0000 @@ -1630,7 +1630,7 @@ public: for them. We have to take care of restricting the predicate such an object represents f1=f2= ...=fn to the projection of known fields fi1=...=fik. */ -struct st_join_table; +class JOIN_TAB; class Item_equal: public Item_bool_func { @@ -1677,7 +1677,7 @@ public: virtual void print(String *str, enum_query_type query_type); const CHARSET_INFO *compare_collation() { return fields.head()->collation.collation; } - friend bool setup_sj_materialization(struct st_join_table *tab); + friend bool setup_sj_materialization(JOIN_TAB *tab); }; class COND_EQUAL: public Sql_alloc === modified file 'sql/item_subselect.h' --- a/sql/item_subselect.h 2011-04-06 11:13:33 +0000 +++ b/sql/item_subselect.h 2011-06-17 08:57:08 +0000 @@ -573,7 +573,7 @@ private: }; -struct st_join_table; +class JOIN_TAB; /* @@ -596,7 +596,7 @@ struct st_join_table; class subselect_uniquesubquery_engine: public subselect_engine { protected: - st_join_table *tab; + JOIN_TAB *tab; Item *cond; /* The WHERE condition of subselect */ /* TRUE<=> last execution produced empty set. Valid only when left @@ -607,7 +607,7 @@ protected: public: // constructor can assign THD because it will be called after JOIN::prepare - subselect_uniquesubquery_engine(THD *thd_arg, st_join_table *tab_arg, + subselect_uniquesubquery_engine(THD *thd_arg, JOIN_TAB *tab_arg, Item_subselect *subs, Item *where) :subselect_engine(subs, 0), tab(tab_arg), cond(where) { @@ -670,7 +670,7 @@ private: public: // constructor can assign THD because it will be called after JOIN::prepare - subselect_indexsubquery_engine(THD *thd_arg, st_join_table *tab_arg, + subselect_indexsubquery_engine(THD *thd_arg, JOIN_TAB *tab_arg, Item_subselect *subs, Item *where, Item *having_arg, bool chk_null) :subselect_uniquesubquery_engine(thd_arg, tab_arg, subs, where), === modified file 'sql/records.h' --- a/sql/records.h 2011-03-22 11:44:40 +0000 +++ b/sql/records.h 2011-06-17 08:57:08 +0000 @@ -17,7 +17,7 @@ #include /* for uint typedefs */ -struct st_join_table; +class JOIN_TAB; class handler; struct TABLE; class THD; @@ -41,8 +41,8 @@ class Copy_field; struct READ_RECORD { typedef int (*Read_func)(READ_RECORD*); - typedef void (*Unlock_row_func)(st_join_table *); - typedef int (*Setup_func)(struct st_join_table*); + typedef void (*Unlock_row_func)(JOIN_TAB *); + typedef int (*Setup_func)(JOIN_TAB*); TABLE *table; /* Head-form */ handler *file; @@ -78,6 +78,6 @@ void init_read_record_idx(READ_RECORD *i bool print_error, uint idx, bool reverse); void end_read_record(READ_RECORD *info); -void rr_unlock_row(st_join_table *tab); +void rr_unlock_row(JOIN_TAB *tab); #endif /* SQL_RECORDS_H */ === modified file 'sql/sql_select.cc' --- a/sql/sql_select.cc 2011-06-10 16:57:01 +0000 +++ b/sql/sql_select.cc 2011-06-17 08:57:08 +0000 @@ -148,7 +148,7 @@ static int join_read_system(JOIN_TAB *ta static int join_read_const(JOIN_TAB *tab); static int join_read_key(JOIN_TAB *tab); static int join_read_key2(JOIN_TAB *tab, TABLE *table, TABLE_REF *table_ref); -static void join_read_key_unlock_row(st_join_table *tab); +static void join_read_key_unlock_row(JOIN_TAB *tab); static int join_read_always_key(JOIN_TAB *tab); static int join_read_last_key(JOIN_TAB *tab); static int join_no_more_records(READ_RECORD *info); @@ -10475,7 +10475,7 @@ static void push_index_cond(JOIN_TAB *ta used in all access methods. */ -void rr_unlock_row(st_join_table *tab) +void rr_unlock_row(JOIN_TAB *tab) { READ_RECORD *info= &tab->read_record; info->file->unlock_row(); @@ -18400,7 +18400,7 @@ join_read_key2(JOIN_TAB *tab, TABLE *tab */ static void -join_read_key_unlock_row(st_join_table *tab) +join_read_key_unlock_row(JOIN_TAB *tab) { DBUG_ASSERT(tab->ref.use_count); if (tab->ref.use_count) === modified file 'sql/sql_select.h' --- a/sql/sql_select.h 2011-05-26 15:20:09 +0000 +++ b/sql/sql_select.h 2011-06-17 08:57:08 +0000 @@ -245,9 +245,10 @@ enum enum_nested_loop_state class JOIN_CACHE; class SJ_TMP_TABLE; +class JOIN_TAB; typedef enum_nested_loop_state -(*Next_select_func)(JOIN *, struct st_join_table *, bool); +(*Next_select_func)(JOIN *, JOIN_TAB *, bool); Next_select_func setup_end_select_func(JOIN *join); int rr_sequential(READ_RECORD *info); @@ -268,10 +269,10 @@ inline bool sj_is_materialize_strategy(u */ enum quick_type { QS_NONE, QS_RANGE, QS_DYNAMIC_RANGE}; -typedef struct st_join_table : public Sql_alloc +class JOIN_TAB : public Sql_alloc { - st_join_table(); - +public: + JOIN_TAB(); TABLE *table; Key_use *keyuse; /**< pointer to first used key */ SQL_SELECT *select; @@ -281,12 +282,12 @@ public: QUICK_SELECT_I *quick; Item **on_expr_ref; /**< pointer to the associated on expression */ COND_EQUAL *cond_equal; /**< multiple equalities for the on expression */ - st_join_table *first_inner; /**< first inner table for including outerjoin */ + JOIN_TAB *first_inner; /**< first inner table for including outerjoin */ bool found; /**< true after all matches or null complement */ bool not_null_compl;/**< true before null complement is added */ - st_join_table *last_inner; /**< last table table for embedding outer join */ - st_join_table *first_upper; /**< first inner table for embedding outer join */ - st_join_table *first_unmatched; /**< used for optimization purposes only */ + JOIN_TAB *last_inner; /**< last table table for embedding outer join */ + JOIN_TAB *first_upper; /**< first inner table for embedding outer join */ + JOIN_TAB *first_unmatched; /**< used for optimization purposes only */ /* The value of m_condition before we've attempted to do Index Condition Pushdown. We may need to restore everything back if we first choose one @@ -384,8 +385,8 @@ public: interval (all tables inside are inner of a semijoin) or not. last_sj_inner_tab is not set for Duplicates Weedout. */ - struct st_join_table *first_sj_inner_tab; - struct st_join_table *last_sj_inner_tab; + JOIN_TAB *first_sj_inner_tab; + JOIN_TAB *last_sj_inner_tab; /* Variables for semi-join duplicate elimination */ SJ_TMP_TABLE *flush_weedout_table; @@ -397,7 +398,7 @@ public: join->join_tab[-1] which means stop join execution after the first match. */ - struct st_join_table *do_firstmatch; + JOIN_TAB *do_firstmatch; /* ptr - We're doing a LooseScan, this join tab is the first (i.e. @@ -406,7 +407,7 @@ public: should be checked to see if the current value group had a match. NULL - Not doing a loose scan on this join tab. */ - struct st_join_table *loosescan_match_tab; + JOIN_TAB *loosescan_match_tab; /* Buffer to save index tuple to be able to skip duplicates */ uchar *loosescan_buf; @@ -502,10 +503,10 @@ public: { return ref.has_guarded_conds(); } -} JOIN_TAB; +}; inline -st_join_table::st_join_table() +JOIN_TAB::JOIN_TAB() : table(NULL), keyuse(NULL), select(NULL), === modified file 'sql/structs.h' --- a/sql/structs.h 2011-06-06 19:16:54 +0000 +++ b/sql/structs.h 2011-06-17 08:57:08 +0000 @@ -114,10 +114,10 @@ typedef struct st_key { } KEY; -struct st_join_table; +class JOIN_TAB; typedef struct st_reginfo { /* Extra info about reg */ - struct st_join_table *join_tab; /* Used by SELECT() */ + JOIN_TAB *join_tab; /* Used by SELECT() */ enum thr_lock_type lock_type; /* How database is used */ bool not_exists_optimize; /* === modified file 'sql/table.h' --- a/sql/table.h 2011-06-16 06:30:16 +0000 +++ b/sql/table.h 2011-06-17 08:57:08 +0000 @@ -2040,7 +2040,7 @@ typedef struct st_nested_join Used for pointing out the first table in the plan being covered by this join nest. It is used exclusively within make_outerjoin_info(). */ - struct st_join_table *first_nested; + JOIN_TAB *first_nested; /* Used to count tables in the nested join in 2 isolated places: 1. In make_outerjoin_info(). --===============1029467282== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/martin.hansson@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: martin.hansson@stripped\ # kibsgitv8uio7giq # target_branch: file:///data0/martin/bzrroot/wl5855/mysql-trunk-work/ # testament_sha1: 0d9b2ccd52c9bb73feaa7a785c66ff93a11c66ed # timestamp: 2011-06-17 10:57:13 +0200 # base_revision_id: jon.hauglid@stripped\ # c5bt1ybrftcdtmys # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWQtPfQYABhtfgGAwWHf//353 ngC////yYAsc6U18cQUqgCTH1nkAUAKBooASUlPNHqp5IaaaaeU2U2SeiNNA0GjQAAHMCYmgwmTJ kyMJgmmmRiYAhgEoBBKjT1D0MU9CAAAAAAACRIjU1MASeJ6U0z1EHpDR6npBoM0mmjQI9VQ9QaAD IBoAAGQDJoAyAJJAgATEDRMmmjRpMlNMg2o0BphJnFmz6uElq8uOnC1DD4OQ0SZnKghnZvLN3dr/ uD5ZZhkxkWYYLmoqgHihZrp8j4LM9160BDExFS0O5Y0wStlyszktias1aZtVOReMXpWw1nDYJwf1 e45UQHh10r3PN3q9JAdJBwc6VqWVJjY22m22wTaRTtSRlaMVWHQ40yg0MmxtaGSnEnRVTXFxTNFl VZWlLKkrxqq4uzYa2GSIZ1ZYZsLEwiLxFTlZFKq5Q6nN1szYTLcxDPCGjXbn2W0fKfhL2jUvzevy r1HbBK9rSxT3pySx5IAod+LAUh4KxJ8RFLNdvYKZ8EMNyeC3I2V3sLEk3Gk1exY6yzQCjcAFvPvf RabDxXK44yek3YXoUjBLZJ9OG9AMNrJhWoBHoPYbeKkYNzB+YJb7EvERyy9PIOPhmIJnFTgrPb0S nAr7xourW5CXmTv1d3RcmHDxh5gApfrmj79p97AS1VJdUt27079qEgfk4GYHMMygwMpwqBQoC7Sz b0hXEKEZqEMUISCIrKjb4HxmbkA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