#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 <my_global.h> /* 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().
Attachment: [text/bzr-bundle] bzr/martin.hansson@oracle.com-20110617085708-kibsgitv8uio7giq.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk branch (martin.hansson:3219) WL#5855 | Martin Hansson | 19 Jun |