summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2013-12-12 21:49:14 +0400
committerSergey Vojtovich <svoj@mariadb.org>2013-12-12 21:49:14 +0400
commit2d7c073852767a518424a48667a6e45452178681 (patch)
treee1e36a0c7ba2b7d193bcb45d01e22eb2a8dba0ac /sql/table.h
parent98c4f167c505627644369acfc4e278fab50d29d3 (diff)
downloadmariadb-git-2d7c073852767a518424a48667a6e45452178681.tar.gz
MDEV-5388 - Reduce usage of LOCK_open: unused_tables
Removed unused_tables, find LRU object by timestamp instead.
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/table.h b/sql/table.h
index 17a8387ffa8..c25e2c8a83a 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1011,19 +1011,18 @@ struct TABLE
private:
/**
- Links for the lists of used/unused TABLE objects for this share.
+ Links for the list of all TABLE objects for this share.
Declared as private to avoid direct manipulation with those objects.
One should use methods of I_P_List template instead.
*/
- TABLE *share_next, **share_prev;
TABLE *share_all_next, **share_all_prev;
-
- friend struct TABLE_share;
friend struct All_share_tables;
public:
THD *in_use; /* Which thread uses this */
+ /* Time when table was released to table cache. Valid for unused tables. */
+ ulonglong tc_time;
Field **field; /* Pointer to fields */
uchar *record[2]; /* Pointer to records */
@@ -1374,11 +1373,11 @@ struct TABLE_share
{
static inline TABLE **next_ptr(TABLE *l)
{
- return &l->share_next;
+ return &l->next;
}
static inline TABLE ***prev_ptr(TABLE *l)
{
- return &l->share_prev;
+ return (TABLE ***) &l->prev;
}
};