MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
table_sync_instances.h
Go to the documentation of this file.
1
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software Foundation,
14
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
15
16
#ifndef TABLE_SYNC_INSTANCE_H
17
#define TABLE_SYNC_INSTANCE_H
18
24
#include "
pfs_column_types.h
"
25
#include "
pfs_engine_table.h
"
26
27
struct
PFS_mutex
;
28
struct
PFS_rwlock
;
29
struct
PFS_cond
;
30
37
struct
row_mutex_instances
38
{
40
const
char
*
m_name
;
42
uint
m_name_length
;
44
const
void
*
m_identity
;
46
bool
m_locked
;
48
ulonglong
m_locked_by_thread_id
;
49
};
50
52
class
table_mutex_instances
:
public
PFS_engine_table
53
{
54
public
:
56
static
PFS_engine_table_share
m_share
;
57
static
PFS_engine_table
* create();
58
59
virtual
int
rnd_next
();
60
virtual
int
rnd_pos
(
const
void
*pos);
61
virtual
void
reset_position
(
void
);
62
63
private
:
64
virtual
int
read_row_values(
TABLE
*
table
,
65
unsigned
char
*
buf
,
66
Field
**fields,
67
bool
read_all);
68
69
table_mutex_instances
();
70
71
public
:
72
~
table_mutex_instances
()
73
{}
74
75
private
:
76
void
make_row(
PFS_mutex
*pfs);
77
79
static
THR_LOCK
m_table_lock;
81
static
TABLE_FIELD_DEF
m_field_def;
82
84
row_mutex_instances
m_row;
86
bool
m_row_exists;
88
PFS_simple_index
m_pos;
90
PFS_simple_index
m_next_pos;
91
};
92
94
struct
row_rwlock_instances
95
{
97
const
char
*
m_name
;
99
uint
m_name_length
;
101
const
void
*
m_identity
;
103
bool
m_write_locked
;
105
ulonglong
m_write_locked_by_thread_id
;
107
ulong
m_readers
;
108
};
109
111
class
table_rwlock_instances
:
public
PFS_engine_table
112
{
113
public
:
115
static
PFS_engine_table_share
m_share
;
116
static
PFS_engine_table
* create();
117
118
virtual
int
rnd_next
();
119
virtual
int
rnd_pos
(
const
void
*pos);
120
virtual
void
reset_position
(
void
);
121
122
private
:
123
virtual
int
read_row_values(
TABLE
*
table
,
124
unsigned
char
*
buf
,
125
Field
**fields,
126
bool
read_all);
127
128
table_rwlock_instances
();
129
130
public
:
131
~
table_rwlock_instances
()
132
{}
133
134
private
:
135
void
make_row(
PFS_rwlock
*pfs);
136
138
static
THR_LOCK
m_table_lock;
140
static
TABLE_FIELD_DEF
m_field_def;
141
143
row_rwlock_instances
m_row;
145
bool
m_row_exists;
147
PFS_simple_index
m_pos;
149
PFS_simple_index
m_next_pos;
150
};
151
153
struct
row_cond_instances
154
{
156
const
char
*
m_name
;
158
uint
m_name_length
;
160
const
void
*
m_identity
;
161
};
162
164
class
table_cond_instances
:
public
PFS_engine_table
165
{
166
public
:
168
static
PFS_engine_table_share
m_share
;
169
static
PFS_engine_table
* create();
170
171
virtual
int
rnd_next
();
172
virtual
int
rnd_pos
(
const
void
*pos);
173
virtual
void
reset_position
(
void
);
174
175
private
:
176
virtual
int
read_row_values(
TABLE
*
table
,
177
unsigned
char
*
buf
,
178
Field
**fields,
179
bool
read_all);
180
181
table_cond_instances
();
182
183
public
:
184
~
table_cond_instances
()
185
{}
186
187
private
:
188
void
make_row(
PFS_cond
*pfs);
189
191
static
THR_LOCK
m_table_lock;
193
static
TABLE_FIELD_DEF
m_field_def;
194
196
row_cond_instances
m_row;
198
bool
m_row_exists;
200
PFS_simple_index
m_pos;
202
PFS_simple_index
m_next_pos;
203
};
204
206
#endif
storage
perfschema
table_sync_instances.h
Generated on Sat Nov 9 2013 01:28:41 for MySQL 5.6.14 Source Code Document by
1.8.1.2