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_events_waits.h
Go to the documentation of this file.
1
/* Copyright (c) 2008, 2011, 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_EVENTS_WAITS_H
17
#define TABLE_EVENTS_WAITS_H
18
24
#include "
pfs_column_types.h
"
25
#include "
pfs_engine_table.h
"
26
#include "
pfs_events_waits.h
"
27
28
struct
PFS_thread
;
29
36
struct
row_events_waits
37
{
39
ulonglong
m_thread_internal_id
;
41
ulonglong
m_event_id
;
43
ulonglong
m_end_event_id
;
45
ulonglong
m_nesting_event_id
;
47
enum_event_type
m_nesting_event_type
;
49
const
char
*
m_name
;
51
uint
m_name_length
;
53
ulonglong
m_timer_start
;
55
ulonglong
m_timer_end
;
57
ulonglong
m_timer_wait
;
59
const
char
*
m_object_type
;
61
uint
m_object_type_length
;
63
char
m_object_schema
[
COL_OBJECT_SCHEMA_SIZE
];
65
uint
m_object_schema_length
;
67
char
m_object_name
[
COL_OBJECT_NAME_EXTENDED_SIZE
];
69
uint
m_object_name_length
;
71
char
m_index_name
[
COL_INDEX_NAME_SIZE
];
73
uint
m_index_name_length
;
75
intptr
m_object_instance_addr
;
77
char
m_source
[
COL_SOURCE_SIZE
];
79
uint
m_source_length
;
81
enum_operation_type
m_operation
;
83
ulonglong
m_number_of_bytes
;
85
uint
m_flags
;
86
};
87
89
struct
pos_events_waits_current
:
public
PFS_double_index
90
{
91
pos_events_waits_current
()
92
:
PFS_double_index
(0, 0)
93
{}
94
95
inline
void
reset(
void
)
96
{
97
m_index_1
= 0;
98
m_index_2
= 0;
99
}
100
101
inline
void
next_thread(
void
)
102
{
103
m_index_1
++;
104
m_index_2
= 0;
105
}
106
};
107
109
struct
pos_events_waits_history
:
public
PFS_double_index
110
{
111
pos_events_waits_history
()
112
:
PFS_double_index
(0, 0)
113
{}
114
115
inline
void
reset(
void
)
116
{
117
m_index_1
= 0;
118
m_index_2
= 0;
119
}
120
121
inline
void
next_thread(
void
)
122
{
123
m_index_1
++;
124
m_index_2
= 0;
125
}
126
};
127
132
class
table_events_waits_common
:
public
PFS_engine_table
133
{
134
protected
:
135
virtual
int
read_row_values
(
TABLE
*
table
,
136
unsigned
char
*
buf
,
137
Field
**fields,
138
bool
read_all);
139
140
table_events_waits_common
(
const
PFS_engine_table_share
*share,
void
*pos);
141
142
~
table_events_waits_common
()
143
{}
144
145
void
clear_object_columns();
146
int
make_table_object_columns(
volatile
PFS_events_waits
*wait);
147
int
make_file_object_columns(
volatile
PFS_events_waits
*wait);
148
int
make_socket_object_columns(
volatile
PFS_events_waits
*wait);
149
150
void
make_row
(
bool
thread_own_wait,
PFS_thread
*pfs_thread,
151
volatile
PFS_events_waits
*wait);
152
154
row_events_waits
m_row
;
156
bool
m_row_exists
;
157
};
158
160
class
table_events_waits_current
:
public
table_events_waits_common
161
{
162
public
:
164
static
PFS_engine_table_share
m_share
;
165
static
PFS_engine_table
* create();
166
static
int
delete_all_rows();
167
168
virtual
int
rnd_next
();
169
virtual
int
rnd_pos
(
const
void
*pos);
170
virtual
void
reset_position
(
void
);
171
172
protected
:
173
table_events_waits_current
();
174
175
public
:
176
~
table_events_waits_current
()
177
{}
178
179
private
:
180
friend
class
table_events_waits_history
;
181
friend
class
table_events_waits_history_long
;
182
184
static
THR_LOCK
m_table_lock;
190
static
TABLE_FIELD_DEF
m_field_def;
191
193
pos_events_waits_current
m_pos;
195
pos_events_waits_current
m_next_pos;
196
};
197
199
class
table_events_waits_history
:
public
table_events_waits_common
200
{
201
public
:
203
static
PFS_engine_table_share
m_share
;
204
static
PFS_engine_table
* create();
205
static
int
delete_all_rows();
206
207
virtual
int
rnd_next
();
208
virtual
int
rnd_pos
(
const
void
*pos);
209
virtual
void
reset_position
(
void
);
210
211
protected
:
212
table_events_waits_history
();
213
214
public
:
215
~
table_events_waits_history
()
216
{}
217
218
private
:
220
static
THR_LOCK
m_table_lock;
221
223
pos_events_waits_history
m_pos;
225
pos_events_waits_history
m_next_pos;
226
};
227
229
class
table_events_waits_history_long
:
public
table_events_waits_common
230
{
231
public
:
233
static
PFS_engine_table_share
m_share
;
234
static
PFS_engine_table
* create();
235
static
int
delete_all_rows();
236
237
virtual
int
rnd_next
();
238
virtual
int
rnd_pos
(
const
void
*pos);
239
virtual
void
reset_position
(
void
);
240
241
protected
:
242
table_events_waits_history_long
();
243
244
public
:
245
~
table_events_waits_history_long
()
246
{}
247
248
private
:
250
static
THR_LOCK
m_table_lock;
251
253
PFS_simple_index
m_pos;
255
PFS_simple_index
m_next_pos;
256
};
257
259
#endif
storage
perfschema
table_events_waits.h
Generated on Sat Nov 9 2013 01:28:40 for MySQL 5.6.14 Source Code Document by
1.8.1.2