summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2016-03-22 18:01:40 +0400
committerSergey Vojtovich <svoj@mariadb.org>2016-03-22 18:01:40 +0400
commitc42ffc1ca850f13f736eb929f351c8f14d027493 (patch)
tree70c29dfcde6226c1be4b2f6ff966262bd2e29612 /sql
parent1fc2c63fb1ddc8622f370e59adeb2c512c7b7d63 (diff)
downloadmariadb-git-c42ffc1ca850f13f736eb929f351c8f14d027493.tar.gz
Cleanup All_share_tables_list definition
Diffstat (limited to 'sql')
-rw-r--r--sql/table.h18
-rw-r--r--sql/table_cache.cc2
-rw-r--r--sql/table_cache.h4
3 files changed, 5 insertions, 19 deletions
diff --git a/sql/table.h b/sql/table.h
index 562eae99500..29309b14a61 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -491,9 +491,6 @@ TABLE_CATEGORY get_table_category(const LEX_STRING *db,
const LEX_STRING *name);
-struct TABLE_share;
-struct All_share_tables;
-
typedef struct st_table_field_type
{
LEX_STRING name;
@@ -1009,7 +1006,7 @@ private:
One should use methods of I_P_List template instead.
*/
TABLE *share_all_next, **share_all_prev;
- friend struct All_share_tables;
+ friend struct TDC_element;
public:
@@ -1410,19 +1407,6 @@ struct TABLE_share
};
-struct All_share_tables
-{
- static inline TABLE **next_ptr(TABLE *l)
- {
- return &l->share_all_next;
- }
- static inline TABLE ***prev_ptr(TABLE *l)
- {
- return &l->share_all_prev;
- }
-};
-
-
enum enum_schema_table_state
{
NOT_PROCESSED= 0,
diff --git a/sql/table_cache.cc b/sql/table_cache.cc
index 5e7a69e21ed..b6c1e32b350 100644
--- a/sql/table_cache.cc
+++ b/sql/table_cache.cc
@@ -841,7 +841,7 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
const char *db, const char *table_name,
bool kill_delayed_threads)
{
- I_P_List <TABLE, TABLE_share> purge_tables;
+ TDC_element::TABLE_list purge_tables;
TABLE *table;
TDC_element *element;
uint my_refs= 1;
diff --git a/sql/table_cache.h b/sql/table_cache.h
index a3e6715d5d0..2efc535c425 100644
--- a/sql/table_cache.h
+++ b/sql/table_cache.h
@@ -31,7 +31,9 @@ public:
TABLE_SHARE *share;
typedef I_P_List <TABLE, TABLE_share> TABLE_list;
- typedef I_P_List <TABLE, All_share_tables> All_share_tables_list;
+ typedef I_P_List <TABLE, I_P_List_adapter<TABLE, &TABLE::share_all_next,
+ &TABLE::share_all_prev> >
+ All_share_tables_list;
/**
Protects ref_count, m_flush_tickets, all_tables, free_tables, flushed,
all_tables_refs.