MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CreateTrigImpl.hpp
1 /* Copyright (c) 2007, 2010, 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
14  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
15 
16 #ifndef CREATE_TRIG_IMPL_HPP
17 #define CREATE_TRIG_IMPL_HPP
18 
19 #include "SignalData.hpp"
20 #include <Bitmask.hpp>
21 #include <AttributeList.hpp>
22 
24 {
25  enum RequestType
26  {
27  CreateTriggerOnline = 1,
28  CreateTriggerOffline = 2
29  };
30 
31  STATIC_CONST( SignalLength = 11 + 3);
32  SECTION( ATTRIBUTE_MASK_SECTION = 0 );
33 
34  // tableVersion, indexVersion, name section used only within DICT
35 
36  Uint32 senderRef;
37  Uint32 senderData;
38  Uint32 requestType;
39  Uint32 tableId;
40  Uint32 tableVersion;
41  Uint32 indexId;
42  Uint32 indexVersion;
43  Uint32 triggerNo;
44  Uint32 triggerId;
45  Uint32 triggerInfo;
46  Uint32 receiverRef;
47  Uint32 upgradeExtra[3]; // Send TriggerId's as defined in 6.3 here
48 };
49 
51  STATIC_CONST( SignalLength = 5 );
52 
53  Uint32 senderRef;
54  Uint32 senderData;
55  Uint32 tableId; // BACKUP and SUMA want these back from TUP
56  Uint32 triggerId;
57  Uint32 triggerInfo;
58 };
59 
61  enum ErrorCode {
62  NoError = 0,
63  Busy = 701,
64  NotMaster = 702,
65  TriggerNameTooLong = 4236,
66  TooManyTriggers = 4237,
67  TriggerNotFound = 4238,
68  TriggerExists = 4239,
69  UnsupportedTriggerType = 4240,
70  BadRequestType = 4247,
71  InvalidName = 4248,
72  InvalidTable = 4249,
73  InconsistentTC = 293
74  };
75 
76  STATIC_CONST( SignalLength = 9 );
77 
78  Uint32 senderRef;
79  Uint32 senderData;
80  Uint32 tableId;
81  Uint32 triggerId;
82  Uint32 triggerInfo;
83  Uint32 errorCode;
84  Uint32 errorLine;
85  Uint32 errorNodeId;
86  Uint32 masterNodeId;
87 };
88 
89 #endif