My Project
rpl_constants.h
00001 /* Copyright (c) 2007 MySQL AB, 2008 Sun Microsystems, Inc.
00002    Use is subject to license terms.
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; version 2 of the License.
00007 
00008    This program is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011    GNU General Public License for more details.
00012 
00013    You should have received a copy of the GNU General Public License
00014    along with this program; if not, write to the Free Software
00015    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
00016 
00017 #ifndef RPL_CONSTANTS_H
00018 #define RPL_CONSTANTS_H
00019 
00020 #include "my_global.h"
00021 
00025 enum Incident {
00027   INCIDENT_NONE = 0,
00028 
00030   INCIDENT_LOST_EVENTS = 1,
00031 
00033   INCIDENT_COUNT
00034 };
00035 
00036 /*
00037   Constants used to parse the stream of bytes sent by a slave
00038   when commands COM_BINLOG_DUMP or COM_BINLOG_DUMP_GTID are
00039   sent.
00040 */
00041 const int BINLOG_POS_INFO_SIZE= 8;
00042 const int BINLOG_DATA_SIZE_INFO_SIZE= 4;
00043 const int BINLOG_POS_OLD_INFO_SIZE= 4;
00044 const int BINLOG_FLAGS_INFO_SIZE= 2;
00045 const int BINLOG_SERVER_ID_INFO_SIZE= 4;
00046 const int BINLOG_NAME_SIZE_INFO_SIZE= 4;
00047 
00048 const int BINLOG_DUMP_NON_BLOCK= 1<<0;
00049 
00053 enum ExtraRowInfoFormat {
00055   ERIF_NDB          =   0,
00056 
00058   ERIF_LASTRESERVED =  63,
00059 
00064   ERIF_OPEN1        =  64,
00065   ERIF_OPEN2        =  65,
00066 
00067   ERIF_LASTOPEN     =  254,
00068 
00076   ERIF_MULTI        =  255
00077 };
00078 
00079 /*
00080    1 byte length, 1 byte format
00081    Length is total length in bytes, including 2 byte header
00082    Length values 0 and 1 are currently invalid and reserved.
00083 */
00084 #define EXTRA_ROW_INFO_LEN_OFFSET 0
00085 #define EXTRA_ROW_INFO_FORMAT_OFFSET 1
00086 #define EXTRA_ROW_INFO_HDR_BYTES 2
00087 #define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HDR_BYTES)
00088 
00089 #endif /* RPL_CONSTANTS_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines