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_stages.h
Go to the documentation of this file.
1
/* Copyright (c) 2010, 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_STAGES_H
17
#define TABLE_EVENTS_STAGES_H
18
24
#include "
pfs_column_types.h
"
25
#include "
pfs_engine_table.h
"
26
#include "
pfs_events_stages.h
"
27
28
struct
PFS_thread
;
29
36
struct
row_events_stages
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
char
m_source
[
COL_SOURCE_SIZE
];
61
uint
m_source_length
;
62
};
63
65
struct
pos_events_stages_history
:
public
PFS_double_index
66
{
67
pos_events_stages_history
()
68
:
PFS_double_index
(0, 0)
69
{}
70
71
inline
void
reset(
void
)
72
{
73
m_index_1
= 0;
74
m_index_2
= 0;
75
}
76
77
inline
void
next_thread(
void
)
78
{
79
m_index_1
++;
80
m_index_2
= 0;
81
}
82
};
83
88
class
table_events_stages_common
:
public
PFS_engine_table
89
{
90
protected
:
91
virtual
int
read_row_values
(
TABLE
*
table
,
92
unsigned
char
*
buf
,
93
Field
**fields,
94
bool
read_all);
95
96
table_events_stages_common
(
const
PFS_engine_table_share
*share,
void
*pos);
97
98
~
table_events_stages_common
()
99
{}
100
101
void
make_row
(
PFS_events_stages
*stage);
102
104
row_events_stages
m_row
;
106
bool
m_row_exists
;
107
};
108
110
class
table_events_stages_current
:
public
table_events_stages_common
111
{
112
public
:
114
static
PFS_engine_table_share
m_share
;
115
static
PFS_engine_table
* create();
116
static
int
delete_all_rows();
117
118
virtual
int
rnd_init
(
bool
scan);
119
virtual
int
rnd_next
();
120
virtual
int
rnd_pos
(
const
void
*pos);
121
virtual
void
reset_position
(
void
);
122
123
protected
:
124
table_events_stages_current
();
125
126
public
:
127
~
table_events_stages_current
()
128
{}
129
130
private
:
131
friend
class
table_events_stages_history
;
132
friend
class
table_events_stages_history_long
;
133
135
static
THR_LOCK
m_table_lock;
141
static
TABLE_FIELD_DEF
m_field_def;
142
144
PFS_simple_index
m_pos;
146
PFS_simple_index
m_next_pos;
147
};
148
150
class
table_events_stages_history
:
public
table_events_stages_common
151
{
152
public
:
154
static
PFS_engine_table_share
m_share
;
155
static
PFS_engine_table
* create();
156
static
int
delete_all_rows();
157
158
virtual
int
rnd_init
(
bool
scan);
159
virtual
int
rnd_next
();
160
virtual
int
rnd_pos
(
const
void
*pos);
161
virtual
void
reset_position
(
void
);
162
163
protected
:
164
table_events_stages_history
();
165
166
public
:
167
~
table_events_stages_history
()
168
{}
169
170
private
:
172
static
THR_LOCK
m_table_lock;
173
175
pos_events_stages_history
m_pos;
177
pos_events_stages_history
m_next_pos;
178
};
179
181
class
table_events_stages_history_long
:
public
table_events_stages_common
182
{
183
public
:
185
static
PFS_engine_table_share
m_share
;
186
static
PFS_engine_table
* create();
187
static
int
delete_all_rows();
188
189
virtual
int
rnd_init
(
bool
scan);
190
virtual
int
rnd_next
();
191
virtual
int
rnd_pos
(
const
void
*pos);
192
virtual
void
reset_position
(
void
);
193
194
protected
:
195
table_events_stages_history_long
();
196
197
public
:
198
~
table_events_stages_history_long
()
199
{}
200
201
private
:
203
static
THR_LOCK
m_table_lock;
204
206
PFS_simple_index
m_pos;
208
PFS_simple_index
m_next_pos;
209
};
210
212
#endif
storage
perfschema
table_events_stages.h
Generated on Sat Nov 9 2013 01:28:40 for MySQL 5.6.14 Source Code Document by
1.8.1.2