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
trx0i_s.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
4
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc.,
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17
*****************************************************************************/
18
19
/**************************************************/
28
#ifndef trx0i_s_h
29
#define trx0i_s_h
30
31
#include "univ.i"
32
#include "
trx0types.h
"
33
#include "
dict0types.h
"
34
#include "
ut0ut.h
"
35
38
#define TRX_I_S_MEM_LIMIT 16777216
/* 16 MiB */
39
42
#define TRX_I_S_LOCK_DATA_MAX_LEN 8192
43
46
#define TRX_I_S_TRX_QUERY_MAX_LEN 1024
47
50
#define TRX_I_S_TRX_OP_STATE_MAX_LEN 64
51
54
#define TRX_I_S_TRX_FK_ERROR_MAX_LEN 256
55
58
#define TRX_I_S_TRX_ISOLATION_LEVEL_MAX_LEN 16
59
62
#define TRX_I_S_STRING_COPY(data, field, constraint, tcache) \
63
do { \
64
if (strlen(data) > constraint) { \
65
char buff[constraint + 1]; \
66
strncpy(buff, data, constraint); \
67
buff[constraint] = '\0'; \
68
\
69
field = static_cast<const char*>( \
70
ha_storage_put_memlim( \
71
(tcache)->storage, buff, constraint + 1,\
72
MAX_ALLOWED_FOR_STORAGE(tcache))); \
73
} else { \
74
field = static_cast<const char*>( \
75
ha_storage_put_str_memlim( \
76
(tcache)->storage, data, \
77
MAX_ALLOWED_FOR_STORAGE(tcache))); \
78
} \
79
} while (0)
80
82
struct
i_s_locks_row_t
;
83
85
struct
i_s_hash_chain_t
;
86
89
struct
i_s_hash_chain_t
{
90
i_s_locks_row_t
*
value
;
92
i_s_hash_chain_t
*
next
;
93
};
94
96
struct
i_s_locks_row_t
{
97
trx_id_t
lock_trx_id
;
98
const
char
*
lock_mode
;
100
const
char
*
lock_type
;
102
const
char
*
lock_table
;
104
const
char
*
lock_index
;
108
/* @{ */
109
ulint
lock_space
;
110
ulint
lock_page
;
111
ulint
lock_rec
;
113
const
char
*
lock_data
;
114
/* @} */
115
117
/* @{ */
118
table_id_t
lock_table_id
;
121
i_s_hash_chain_t
hash_chain
;
123
/* @} */
124
};
125
127
struct
i_s_trx_row_t
{
128
trx_id_t
trx_id
;
129
const
char
*
trx_state
;
131
ib_time_t
trx_started
;
132
const
i_s_locks_row_t
*
requested_lock_row
;
136
ib_time_t
trx_wait_started
;
137
ullint
trx_weight
;
138
ulint
trx_mysql_thread_id
;
139
const
char
*
trx_query
;
141
struct
charset_info_st
*
trx_query_cs
;
144
const
char
*
trx_operation_state
;
145
ulint
trx_tables_in_use
;
147
ulint
trx_tables_locked
;
150
ulint
trx_lock_structs
;
152
ulint
trx_lock_memory_bytes
;
155
ulint
trx_rows_locked
;
156
ullint
trx_rows_modified
;
157
ulint
trx_concurrency_tickets
;
160
const
char
*
trx_isolation_level
;
162
ibool
trx_unique_checks
;
164
ibool
trx_foreign_key_checks
;
166
const
char
*
trx_foreign_key_error
;
168
ibool
trx_has_search_latch
;
170
ulint
trx_search_latch_timeout
;
172
ulint
trx_is_read_only
;
174
ulint
trx_is_autocommit_non_locking
;
177
};
178
180
struct
i_s_lock_waits_row_t
{
181
const
i_s_locks_row_t
*
requested_lock_row
;
182
const
i_s_locks_row_t
*
blocking_lock_row
;
183
};
184
186
struct
trx_i_s_cache_t
;
187
190
enum
i_s_table
{
191
I_S_INNODB_TRX
,
192
I_S_INNODB_LOCKS
,
193
I_S_INNODB_LOCK_WAITS
194
};
195
199
extern
trx_i_s_cache_t
*
trx_i_s_cache
;
200
201
/*******************************************************************/
203
UNIV_INTERN
204
void
205
trx_i_s_cache_init
(
206
/*===============*/
207
trx_i_s_cache_t
* cache);
208
/*******************************************************************/
210
UNIV_INTERN
211
void
212
trx_i_s_cache_free
(
213
/*===============*/
214
trx_i_s_cache_t
* cache);
216
/*******************************************************************/
218
UNIV_INTERN
219
void
220
trx_i_s_cache_start_read
(
221
/*=====================*/
222
trx_i_s_cache_t
* cache);
224
/*******************************************************************/
226
UNIV_INTERN
227
void
228
trx_i_s_cache_end_read
(
229
/*===================*/
230
trx_i_s_cache_t
* cache);
232
/*******************************************************************/
234
UNIV_INTERN
235
void
236
trx_i_s_cache_start_write
(
237
/*======================*/
238
trx_i_s_cache_t
* cache);
240
/*******************************************************************/
242
UNIV_INTERN
243
void
244
trx_i_s_cache_end_write
(
245
/*====================*/
246
trx_i_s_cache_t
* cache);
249
/*******************************************************************/
253
UNIV_INTERN
254
ulint
255
trx_i_s_cache_get_rows_used
(
256
/*========================*/
257
trx_i_s_cache_t
* cache,
258
enum
i_s_table
table
);
260
/*******************************************************************/
264
UNIV_INTERN
265
void
*
266
trx_i_s_cache_get_nth_row
(
267
/*======================*/
268
trx_i_s_cache_t
* cache,
269
enum
i_s_table
table
,
270
ulint
n
);
272
/*******************************************************************/
275
UNIV_INTERN
276
int
277
trx_i_s_possibly_fetch_data_into_cache
(
278
/*===================================*/
279
trx_i_s_cache_t
* cache);
281
/*******************************************************************/
285
UNIV_INTERN
286
ibool
287
trx_i_s_cache_is_truncated
(
288
/*=======================*/
289
trx_i_s_cache_t
* cache);
294
#define TRX_I_S_LOCK_ID_MAX_LEN (TRX_ID_MAX_LEN + 63)
295
296
/*******************************************************************/
302
UNIV_INTERN
303
char
*
304
trx_i_s_create_lock_id
(
305
/*===================*/
306
const
i_s_locks_row_t
* row,
307
char
* lock_id,
308
ulint lock_id_size);
311
#endif
/* trx0i_s_h */
storage
innobase
include
trx0i_s.h
Generated on Sat Nov 9 2013 01:26:36 for MySQL 5.6.14 Source Code Document by
1.8.1.2