MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CreateTrigImpl.cpp
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 #include <signaldata/CreateTrigImpl.hpp>
17 #include <trigger_definitions.h>
18 
19 bool
20 printCREATE_TRIG_IMPL_REQ(FILE* output, const Uint32* theData, Uint32 len, Uint16)
21 {
22  const CreateTrigImplReq* sig = (const CreateTrigImplReq*)theData;
23  const Uint32 triggerType =
24  TriggerInfo::getTriggerType(sig->triggerInfo);
25  const Uint32 triggerActionTime =
26  TriggerInfo::getTriggerActionTime(sig->triggerInfo);
27  const Uint32 triggerEvent =
28  TriggerInfo::getTriggerEvent(sig->triggerInfo);
29  const Uint32 monitorReplicas =
30  TriggerInfo::getMonitorReplicas(sig->triggerInfo);
31  const Uint32 monitorAllAttributes =
32  TriggerInfo::getMonitorAllAttributes(sig->triggerInfo);
33  const Uint32 reportAllMonitoredAttributes =
34  TriggerInfo::getReportAllMonitoredAttributes(sig->triggerInfo);
35  fprintf(output, " senderRef: 0x%x", sig->senderRef);
36  fprintf(output, " senderData: %u", sig->senderData);
37  fprintf(output, " requestType: %u", sig->requestType);
38  fprintf(output, "\n");
39  fprintf(output, " tableId: %u", sig->tableId);
40  fprintf(output, " tableVersion: 0x%x", sig->tableVersion);
41  fprintf(output, " indexId: %u", sig->indexId);
42  fprintf(output, " indexVersion: 0x%x", sig->indexVersion);
43  fprintf(output, " triggerNo: %u", sig->triggerNo);
44  fprintf(output, "\n");
45  fprintf(output, " triggerId: %u", sig->triggerId);
46  fprintf(output, " triggerInfo: 0x%x", sig->triggerInfo);
47  fprintf(output, "\n");
48  fprintf(output, " triggerType: %u [%s]",
49  triggerType,
50  TriggerInfo::triggerTypeName(triggerType));
51  fprintf(output, "\n");
52  fprintf(output, " triggerActionTime: %u [%s]",
53  triggerActionTime,
54  TriggerInfo::triggerActionTimeName(triggerActionTime));
55  fprintf(output, "\n");
56  fprintf(output, " triggerEvent: %u [%s]",
57  triggerEvent,
58  TriggerInfo::triggerEventName(triggerEvent));
59  fprintf(output, "\n");
60  fprintf(output, " monitorReplicas: %u",
61  monitorReplicas);
62  fprintf(output, "\n");
63  fprintf(output, " monitorAllAttributes: %u",
64  monitorAllAttributes);
65  fprintf(output, "\n");
66  fprintf(output, " reportAllMonitoredAttributes: %u",
67  reportAllMonitoredAttributes);
68  fprintf(output, " receiverRef: 0x%x", sig->receiverRef);
69  fprintf(output, "\n");
70  return true;
71 }
72 
73 bool
74 printCREATE_TRIG_IMPL_CONF(FILE* output, const Uint32* theData, Uint32 len, Uint16)
75 {
76  const CreateTrigImplConf* sig = (const CreateTrigImplConf*)theData;
77  fprintf(output, " senderRef: 0x%x", sig->senderRef);
78  fprintf(output, " senderData: %u", sig->senderData);
79  fprintf(output, "\n");
80  fprintf(output, " tableId: %u", sig->tableId);
81  fprintf(output, " triggerId: %u", sig->triggerId);
82  fprintf(output, " triggerInfo: 0x%x", sig->triggerInfo);
83  fprintf(output, "\n");
84  return true;
85 }
86 
87 bool
88 printCREATE_TRIG_IMPL_REF(FILE* output, const Uint32* theData, Uint32 len, Uint16)
89 {
90  const CreateTrigImplRef* sig = (CreateTrigImplRef*)theData;
91  fprintf(output, " senderRef: 0x%x", sig->senderRef);
92  fprintf(output, " senderData: %u", sig->senderData);
93  fprintf(output, "\n");
94  fprintf(output, " tableId: %u", sig->tableId);
95  fprintf(output, " triggerId: %u", sig->triggerId);
96  fprintf(output, " triggerInfo: 0x%x", sig->triggerInfo);
97  fprintf(output, "\n");
98  fprintf(output, " errorCode: %u", sig->errorCode);
99  fprintf(output, " errorLine: %u", sig->errorLine);
100  fprintf(output, " errorNodeId: %u", sig->errorNodeId);
101  fprintf(output, " masterNodeId: %u", sig->masterNodeId);
102  fprintf(output, "\n");
103  return true;
104 }