3891 Dmitry Lenev 2012-05-04
WL#5772 "Add partitioned Table Definition Cache to avoid
using LOCK_open and its derivatives in DML queries".
Review change #3: Use I_P_List_adapter<> instead of
hand-written adapter class.
modified:
sql/sql_base.h
sql/table.h
3890 Dmitry Lenev 2012-05-03
WL#5772 "Add partitioned Table Definition Cache to avoid
using LOCK_open and its derivatives in DML queries".
Review change #2: fix failing perfschema.func_mutex test
by replacing LOCK_open usage with LOCK_table_cache.
modified:
mysql-test/suite/perfschema/r/func_mutex.result
mysql-test/suite/perfschema/t/func_mutex.test
=== modified file 'sql/sql_base.h'
--- a/sql/sql_base.h 2012-04-14 14:18:30 +0000
+++ b/sql/sql_base.h 2012-05-04 07:13:43 +0000
@@ -618,7 +618,10 @@ struct Table_cache_element
* for this table in this table cache (one such list per table cache).
* The table cache element represents the table in each table cache.
*/
- typedef I_P_List <TABLE, TABLE_table_cache> TABLE_list;
+ typedef I_P_List <TABLE,
+ I_P_List_adapter<TABLE,
+ &TABLE::share_next,
+ &TABLE::share_prev> > TABLE_list;
TABLE_list used_tables;
TABLE_list free_tables;
TABLE_SHARE *share;
=== modified file 'sql/table.h'
--- a/sql/table.h 2012-04-20 12:37:01 +0000
+++ b/sql/table.h 2012-05-04 07:13:43 +0000
@@ -908,7 +908,11 @@ private:
*/
TABLE *share_next, **share_prev;
- friend struct TABLE_table_cache;
+ /*
+ Give Table_cache_element access to the above two members to allow
+ using them for linking TABLE objects in list.
+ */
+ friend struct Table_cache_element;
Field_temporal_with_date_and_time *timestamp_field;
@@ -1154,24 +1158,6 @@ public:
};
-/**
- Helper class which specifies which members of TABLE are used for
- participation in the list of used/unused TABLE objects for the share.
-*/
-
-struct TABLE_table_cache
-{
- static inline TABLE **next_ptr(TABLE *l)
- {
- return &l->share_next;
- }
- static inline TABLE ***prev_ptr(TABLE *l)
- {
- return &l->share_prev;
- }
-};
-
-
enum enum_schema_table_state
{
NOT_PROCESSED= 0,
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (Dmitry.Lenev:3890 to 3891) WL#5772 | Dmitry Lenev | 9 May |