mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / kernel / signaldata / DictLock.hpp
blobad6580b58c6e9290e9e968ed5e427b9b3c610863
1 /* Copyright (c) 2003, 2006 MySQL AB
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.
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.
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
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef DICT_LOCK_HPP
17 #define DICT_LOCK_HPP
19 #include "SignalData.hpp"
21 // see comments in Dbdict.hpp
23 class DictLockReq {
24 friend class Dbdict;
25 friend class Dbdih;
26 public:
27 STATIC_CONST( SignalLength = 3 );
28 enum LockType {
29 NoLock = 0,
30 NodeRestartLock = 1
32 private:
33 Uint32 userPtr;
34 Uint32 lockType;
35 Uint32 userRef;
38 class DictLockConf {
39 friend class Dbdict;
40 friend class Dbdih;
41 public:
42 STATIC_CONST( SignalLength = 3 );
43 private:
44 Uint32 userPtr;
45 Uint32 lockType;
46 Uint32 lockPtr;
49 class DictLockRef {
50 friend class Dbdict;
51 friend class Dbdih;
52 public:
53 STATIC_CONST( SignalLength = 3 );
54 enum ErrorCode {
55 NotMaster = 1,
56 InvalidLockType = 2,
57 BadUserRef = 3,
58 TooLate = 4,
59 TooManyRequests = 5
61 private:
62 Uint32 userPtr;
63 Uint32 lockType;
64 Uint32 errorCode;
67 class DictUnlockOrd {
68 friend class Dbdict;
69 friend class Dbdih;
70 public:
71 STATIC_CONST( SignalLength = 2 );
72 private:
73 Uint32 lockPtr;
74 Uint32 lockType;
77 #endif