From: Martin Hansson Date: June 13 2011 11:03am Subject: bzr commit into mysql-trunk branch (martin.hansson:3194) WL#5855 List-Archive: http://lists.mysql.com/commits/139145 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0353843457==" --===============0353843457== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///home/martin/bzrroot/wl5855/mysql-trunk-work/ based on revid:anitha.gopi@stripped 3194 Martin Hansson 2011-06-13 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-13 11:03:19 +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-13 11:03:19 +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-13 11:03:19 +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-13 11:03:19 +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-13 11:03:19 +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-13 11:03:19 +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-05-26 15:20:09 +0000 +++ b/sql/table.h 2011-06-13 11:03:19 +0000 @@ -2039,7 +2039,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(). --===============0353843457== 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\ # yj5far2qya73jvws # target_branch: file:///home/martin/bzrroot/wl5855/mysql-trunk-work/ # testament_sha1: 3cdf4198cfc202c44bc52f1b6b5f1c62ea4049b5 # timestamp: 2011-06-13 13:03:27 +0200 # base_revision_id: anitha.gopi@stripped\ # 1iodtowx0t1j78aq # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWfb5mLMABjDfgGAwWHf//353 ngC////yYAsPu8pr7YurYCgATk9uKB1oAbGFrAGiKGmj1B6jIaeoAABoAaAaABzAmJoMJkyZMjCY JppkYmAIYBqeoYhFNG9UHlAAAAAAAA9QJESZTTQptNGRknqZI3kUenqaeVAyHqAPU0EUlMmpvVNq emkybTSmaanpMjTT1A0AaBiaaCSQJoBGmTQ0JiaT0mTRRhDTR6gAImo6c9x50JeqzWnTJBgaTSDI JMOCKAgxzhDcLNf1W1cQ1XjqbXHZk6Lga5yw7Q6NVTsxnwAQwmERT21zGhkh2DQxhQNNFR8rKMqw EZRnJS+b2gBeHYsD3ubID+/lavJ8/8rFKA4EGP60taWdJjY22m22wTaRbzSRnaM12XS41TBpZLKN aWaqxLxJGa65EUWElChDFyGhJpJ7M+ZASD6F5jR6lKwiL6zV0vil1phrE2znymfuYhnbDRs16O/X Z9x9SX2jU/viwmvWfrBOLYlmp5pyl6uaALH8ZshaHkqJSiRrs17MuGme6F2jvT5VeG/qLolbvSpr u6U9ev7UKbJJa/b5vv1m89F2uPWU1HxyvUpMk75fjlxQDD4MoFVAJzmCCNQzIC+9kHaCyrXYuvNz 7Q46TWTkFZ6/JKgCv5ySCV1a3oS9FPsoYdZPcnDh4w81gi3p0o49RxYFdGCV6XV1bvDfekE+2AbC GNqjCHc+lgQMTY9I+xS8QiqURURcIoCTB9klC+l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