MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DropTrig.hpp
1 /*
2  Copyright (C) 2003, 2005-2008 MySQL AB
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef DROP_TRIG_HPP
20 #define DROP_TRIG_HPP
21 
22 #include "SignalData.hpp"
23 #include <NodeBitmask.hpp>
24 #include <trigger_definitions.h>
25 
27 {
28  enum EndpointFlag
29  {
30  MainTrigger = 0,
31  TriggerDst = 1, // TC "consuming" block(s)
32  TriggerSrc = 2 // LQH "producing" block(s)
33  };
34 
35  static Uint32 getEndpointFlag(Uint32 i) { return (i >> 2) & 3;}
36  static void setEndpointFlag(Uint32 & i, Uint32 v) { i |= ((v & 3) << 2); }
37 
38  STATIC_CONST( SignalLength = 11 );
39  SECTION( TRIGGER_NAME_SECTION = 0 ); // optional
40 
41  Uint32 clientRef;
42  Uint32 clientData;
43  Uint32 transId;
44  Uint32 transKey;
45  Uint32 requestInfo;
46  Uint32 tableId;
47  Uint32 tableVersion;
48  Uint32 indexId;
49  Uint32 indexVersion;
50  Uint32 triggerNo;
51  Uint32 triggerId;
52 };
53 
54 struct DropTrigConf {
55  STATIC_CONST( SignalLength = 6 );
56 
57  Uint32 senderRef;
58  union { Uint32 clientData, senderData; };
59  Uint32 transId;
60  Uint32 tableId;
61  Uint32 indexId;
62  Uint32 triggerId;
63 };
64 
65 struct DropTrigRef {
66  enum ErrorCode {
67  NoError = 0,
68  Busy = 701,
69  TriggerNotFound = 4238,
70  BadRequestType = 4247,
71  InvalidName = 4248,
72  InvalidTable = 4249,
73  UnsupportedTriggerType = 4240
74  };
75 
76  STATIC_CONST( SignalLength = 11 );
77 
78  Uint32 senderRef;
79  union { Uint32 clientData, senderData; };
80  Uint32 transId;
81  Uint32 tableId;
82  Uint32 indexId;
83  Uint32 triggerId;
84  Uint32 errorCode;
85  Uint32 errorLine;
86  Uint32 errorNodeId;
87  Uint32 masterNodeId;
88 };
89 
90 #endif