MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BackupImpl.cpp
1 /*
2  Copyright (C) 2003-2006 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 #include <trigger_definitions.h>
20 #include <signaldata/BackupImpl.hpp>
21 
22 bool
23 printDEFINE_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){
24  DefineBackupReq* sig = (DefineBackupReq*)data;
25  fprintf(out, " backupPtr: %d backupId: %d clientRef: %d clientData: %d\n",
26  sig->backupPtr, sig->backupId, sig->clientRef, sig->clientData);
27  fprintf(out, " backupKey: [ %08x%08x ] DataLength: %d\n",
28  sig->backupKey[0], sig->backupKey[1], sig->backupDataLen);
29  char buf[_NDB_NODE_BITMASK_SIZE * 8 + 1];
30  fprintf(out, " Nodes: %s\n", sig->nodes.getText(buf));
31  return true;
32 }
33 
34 bool
35 printDEFINE_BACKUP_REF(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){
36  DefineBackupRef* sig = (DefineBackupRef*)data;
37  fprintf(out, " backupPtr: %d backupId: %d errorCode: %d\n",
38  sig->backupPtr, sig->backupId, sig->errorCode);
39  return true;
40 }
41 
42 bool
43 printDEFINE_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
44  DefineBackupConf* sig = (DefineBackupConf*)data;
45  fprintf(out, " backupPtr: %d backupId: %d\n",
46  sig->backupPtr, sig->backupId);
47  return true;
48 }
49 
50 bool
51 printSTART_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
52  StartBackupReq* sig = (StartBackupReq*)data;
53  fprintf(out, " backupPtr: %d backupId: %d\n",
54  sig->backupPtr, sig->backupId);
55  return true;
56 }
57 
58 bool
59 printSTART_BACKUP_REF(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){
60  StartBackupRef* sig = (StartBackupRef*)data;
61  fprintf(out, " backupPtr: %d backupId: %d errorCode: %d\n",
62  sig->backupPtr, sig->backupId, sig->errorCode);
63  return true;
64 }
65 
66 bool
67 printSTART_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
68  StartBackupConf* sig = (StartBackupConf*)data;
69  fprintf(out, " backupPtr: %d backupId: %d\n",
70  sig->backupPtr, sig->backupId);
71  return true;
72 }
73 
74 bool
75 printBACKUP_FRAGMENT_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
77  fprintf(out, " backupPtr: %d backupId: %d\n",
78  sig->backupPtr, sig->backupId);
79  fprintf(out, " tableId: %d fragmentNo: %d (count = %d)\n",
80  sig->tableId, sig->fragmentNo, sig->count);
81  return true;
82 }
83 
84 bool
85 printBACKUP_FRAGMENT_REF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
87  fprintf(out, " backupPtr: %d backupId: %d nodeId: %d errorCode: %d\n",
88  sig->backupPtr, sig->backupId, sig->nodeId, sig->errorCode);
89  return true;
90 }
91 
92 bool
93 printBACKUP_FRAGMENT_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){
95  fprintf(out, " backupPtr: %d backupId: %d\n",
96  sig->backupPtr, sig->backupId);
97  fprintf(out, " tableId: %d fragmentNo: %d records: %llu bytes: %llu\n",
98  sig->tableId, sig->fragmentNo,
99  sig->noOfRecordsLow + (((Uint64)sig->noOfRecordsHigh) << 32),
100  sig->noOfBytesLow + (((Uint64)sig->noOfBytesHigh) << 32));
101  return true;
102 }
103 
104 bool
105 printSTOP_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
106  StopBackupReq* sig = (StopBackupReq*)data;
107  fprintf(out, " backupPtr: %d backupId: %d\n",
108  sig->backupPtr, sig->backupId);
109  return true;
110 }
111 
112 bool
113 printSTOP_BACKUP_REF(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){
114  StopBackupRef* sig = (StopBackupRef*)data;
115  fprintf(out, " backupPtr: %d backupId: %d errorCode: %d\n",
116  sig->backupPtr, sig->backupId, sig->errorCode);
117  return true;
118 }
119 
120 bool
121 printSTOP_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
122  StopBackupConf* sig = (StopBackupConf*)data;
123  fprintf(out, " backupPtr: %d backupId: %d\n",
124  sig->backupPtr, sig->backupId);
125  return true;
126 }
127 
128 bool
129 printBACKUP_STATUS_REQ(FILE *, const Uint32 *, Uint32, Uint16){
130  return false;
131 }
132 
133 bool
134 printBACKUP_STATUS_CONF(FILE *, const Uint32 *, Uint32, Uint16){
135  return false;
136 }