MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rpl_constants.h
1 /* Copyright (c) 2007 MySQL AB, 2008 Sun Microsystems, Inc.
2  Use is subject to license terms.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16 
17 #ifndef RPL_CONSTANTS_H
18 #define RPL_CONSTANTS_H
19 
20 #include "my_global.h"
21 
25 enum Incident {
27  INCIDENT_NONE = 0,
28 
30  INCIDENT_LOST_EVENTS = 1,
31 
33  INCIDENT_COUNT
34 };
35 
36 /*
37  Constants used to parse the stream of bytes sent by a slave
38  when commands COM_BINLOG_DUMP or COM_BINLOG_DUMP_GTID are
39  sent.
40 */
41 const int BINLOG_POS_INFO_SIZE= 8;
42 const int BINLOG_DATA_SIZE_INFO_SIZE= 4;
43 const int BINLOG_POS_OLD_INFO_SIZE= 4;
44 const int BINLOG_FLAGS_INFO_SIZE= 2;
45 const int BINLOG_SERVER_ID_INFO_SIZE= 4;
46 const int BINLOG_NAME_SIZE_INFO_SIZE= 4;
47 
51 enum ExtraRowInfoFormat {
53  ERIF_NDB = 0,
54 
56  ERIF_LASTRESERVED = 63,
57 
62  ERIF_OPEN1 = 64,
63  ERIF_OPEN2 = 65,
64 
65  ERIF_LASTOPEN = 254,
66 
74  ERIF_MULTI = 255
75 };
76 
77 /*
78  1 byte length, 1 byte format
79  Length is total length in bytes, including 2 byte header
80  Length values 0 and 1 are currently invalid and reserved.
81 */
82 #define EXTRA_ROW_INFO_LEN_OFFSET 0
83 #define EXTRA_ROW_INFO_FORMAT_OFFSET 1
84 #define EXTRA_ROW_INFO_HDR_BYTES 2
85 #define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HDR_BYTES)
86 
87 #endif /* RPL_CONSTANTS_H */