InnoDB Plugin  1.0
lock0priv.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 /**************************************************/
26 #ifndef lock0priv_h
27 #define lock0priv_h
28 
29 #ifndef LOCK_MODULE_IMPLEMENTATION
30 /* If you need to access members of the structures defined in this
31 file, please write appropriate functions that retrieve them and put
32 those functions in lock/ */
33 #error Do not include lock0priv.h outside of the lock/ module
34 #endif
35 
36 #include "univ.i"
37 #include "dict0types.h"
38 #include "hash0hash.h"
39 #include "trx0types.h"
40 #include "ut0lst.h"
41 
43 struct lock_table_t {
46  UT_LIST_NODE_T(lock_t)
49 };
50 
52 struct lock_rec_t {
53  ulint space;
54  ulint page_no;
55  ulint n_bits;
59 };
60 
62 struct lock_t {
63  trx_t* trx;
65  UT_LIST_NODE_T(lock_t)
66  trx_locks;
68  ulint type_mode;
72  hash_node_t hash;
74  dict_index_t* index;
75  union {
78  } un_member;
79 };
80 
81 /*********************************************************************/
84 UNIV_INLINE
85 ulint
87 /*==============*/
88  const lock_t* lock);
90 /*********************************************************************/
93 UNIV_INTERN
94 const lock_t*
96 /*==============*/
97  const lock_t* in_lock,
98  ulint heap_no);
100 /*********************************************************************/
103 UNIV_INTERN
104 void
106 /*============================*/
107  lock_t* lock);
109 /*********************************************************************/
113 UNIV_INLINE
114 trx_id_t
116 /*=========================*/
117  const rec_t* rec,
118  const dict_index_t* index,
119  const ulint* offsets)
120  __attribute__((nonnull, warn_unused_result));
121 
122 #ifndef UNIV_NONINL
123 #include "lock0priv.ic"
124 #endif
125 
126 #endif /* lock0priv_h */