diff options
Diffstat (limited to 'sql/rpl_constants.h')
-rw-r--r-- | sql/rpl_constants.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sql/rpl_constants.h b/sql/rpl_constants.h index 7b5f8fc6b38..83a5cfa2b73 100644 --- a/sql/rpl_constants.h +++ b/sql/rpl_constants.h @@ -31,4 +31,44 @@ enum Incident { INCIDENT_COUNT }; + +/** + Enumeration of the reserved formats of Binlog extra row information +*/ +enum ExtraRowInfoFormat { + /** Ndb format */ + ERIF_NDB = 0, + + /** Reserved formats 0 -> 63 inclusive */ + ERIF_LASTRESERVED = 63, + + /** + Available / uncontrolled formats + 64 -> 254 inclusive + */ + ERIF_OPEN1 = 64, + ERIF_OPEN2 = 65, + + ERIF_LASTOPEN = 254, + + /** + Multi-payload format 255 + + Length is total length, payload is sequence of + sub-payloads with their own headers containing + length + format. + */ + ERIF_MULTI = 255 +}; + +/* + 1 byte length, 1 byte format + Length is total length in bytes, including 2 byte header + Length values 0 and 1 are currently invalid and reserved. +*/ +#define EXTRA_ROW_INFO_LEN_OFFSET 0 +#define EXTRA_ROW_INFO_FORMAT_OFFSET 1 +#define EXTRA_ROW_INFO_HDR_BYTES 2 +#define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HDR_BYTES) + #endif /* RPL_CONSTANTS_H */ |