Skip to content

Commit c42ffc1

Browse files
committed
Cleanup All_share_tables_list definition
1 parent 1fc2c63 commit c42ffc1

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

sql/table.h

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,6 @@ TABLE_CATEGORY get_table_category(const LEX_STRING *db,
491491
const LEX_STRING *name);
492492

493493

494-
struct TABLE_share;
495-
struct All_share_tables;
496-
497494
typedef struct st_table_field_type
498495
{
499496
LEX_STRING name;
@@ -1009,7 +1006,7 @@ struct TABLE
10091006
One should use methods of I_P_List template instead.
10101007
*/
10111008
TABLE *share_all_next, **share_all_prev;
1012-
friend struct All_share_tables;
1009+
friend struct TDC_element;
10131010

10141011
public:
10151012

@@ -1410,19 +1407,6 @@ struct TABLE_share
14101407
};
14111408

14121409

1413-
struct All_share_tables
1414-
{
1415-
static inline TABLE **next_ptr(TABLE *l)
1416-
{
1417-
return &l->share_all_next;
1418-
}
1419-
static inline TABLE ***prev_ptr(TABLE *l)
1420-
{
1421-
return &l->share_all_prev;
1422-
}
1423-
};
1424-
1425-
14261410
enum enum_schema_table_state
14271411
{
14281412
NOT_PROCESSED= 0,

sql/table_cache.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
841841
const char *db, const char *table_name,
842842
bool kill_delayed_threads)
843843
{
844-
I_P_List <TABLE, TABLE_share> purge_tables;
844+
TDC_element::TABLE_list purge_tables;
845845
TABLE *table;
846846
TDC_element *element;
847847
uint my_refs= 1;

sql/table_cache.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class TDC_element
3131
TABLE_SHARE *share;
3232

3333
typedef I_P_List <TABLE, TABLE_share> TABLE_list;
34-
typedef I_P_List <TABLE, All_share_tables> All_share_tables_list;
34+
typedef I_P_List <TABLE, I_P_List_adapter<TABLE, &TABLE::share_all_next,
35+
&TABLE::share_all_prev> >
36+
All_share_tables_list;
3537
/**
3638
Protects ref_count, m_flush_tickets, all_tables, free_tables, flushed,
3739
all_tables_refs.

0 commit comments

Comments
 (0)