rpl_constants.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License, version 2.0,
  4. as published by the Free Software Foundation.
  5. This program is also distributed with certain software (including
  6. but not limited to OpenSSL) that is licensed under separate terms,
  7. as designated in a particular file or component or in included license
  8. documentation. The authors of MySQL hereby grant you an additional
  9. permission to link the program and your derivative works with the
  10. separately licensed software that they have included with MySQL.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License, version 2.0, for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
  18. #ifndef RPL_CONSTANTS_H
  19. #define RPL_CONSTANTS_H
  20. /*
  21. Constants used to parse the stream of bytes sent by a slave
  22. when commands COM_BINLOG_DUMP or COM_BINLOG_DUMP_GTID are
  23. sent.
  24. */
  25. const int BINLOG_POS_INFO_SIZE = 8;
  26. const int BINLOG_DATA_SIZE_INFO_SIZE = 4;
  27. const int BINLOG_POS_OLD_INFO_SIZE = 4;
  28. const int BINLOG_FLAGS_INFO_SIZE = 2;
  29. const int BINLOG_SERVER_ID_INFO_SIZE = 4;
  30. const int BINLOG_NAME_SIZE_INFO_SIZE = 4;
  31. /**
  32. If there is no more events to send send a @ref page_protocol_basic_err_packet
  33. instead of blocking the connection.
  34. @sa ::COM_BINLOG_DUMP, ::COM_BINLOG_DUMP_GTID
  35. */
  36. const int BINLOG_DUMP_NON_BLOCK = 1 << 0;
  37. /**
  38. Enumeration of the reserved formats of Binlog extra row information
  39. */
  40. enum ExtraRowInfoFormat {
  41. /** Ndb format */
  42. ERIF_NDB = 0,
  43. /** Reserved formats 0 -> 63 inclusive */
  44. ERIF_LASTRESERVED = 63,
  45. /**
  46. Available / uncontrolled formats
  47. 64 -> 254 inclusive
  48. */
  49. ERIF_OPEN1 = 64,
  50. ERIF_OPEN2 = 65,
  51. ERIF_LASTOPEN = 254,
  52. /**
  53. Multi-payload format 255
  54. Length is total length, payload is sequence of
  55. sub-payloads with their own headers containing
  56. length + format.
  57. */
  58. ERIF_MULTI = 255
  59. };
  60. #endif /* RPL_CONSTANTS_H */