@@ -129,7 +129,8 @@ class Rotate_event: public Binary_log_event
129
129
130
130
@param buf Contains the serialized event.
131
131
@param length Length of the serialized event.
132
- @param description_event An FDE event, used to get the following information
132
+ @param description_event An FDE event, used to get the
133
+ following information
133
134
-binlog_version
134
135
-server_version
135
136
-post_header_len
@@ -260,7 +261,8 @@ class Start_event_v3: public Binary_log_event
260
261
</pre>
261
262
262
263
@param buf Contains the serialized event.
263
- @param description_event An FDE event, used to get the following information
264
+ @param description_event An FDE event, used to get the
265
+ following information
264
266
-binlog_version
265
267
-server_version
266
268
-post_header_len
@@ -344,7 +346,7 @@ class Format_description_event: public virtual Start_event_v3
344
346
The list of post-headers' lengths followed
345
347
by the checksum alg decription byte
346
348
*/
347
- uint8_t * post_header_len;
349
+ std::vector< uint8_t > post_header_len;
348
350
unsigned char server_version_split[ST_SERVER_VER_SPLIT_LEN];
349
351
/* *
350
352
In some previous version > 5.1 GA event types are assigned
@@ -391,7 +393,8 @@ class Format_description_event: public virtual Start_event_v3
391
393
</pre>
392
394
@param buf Contains the serialized event.
393
395
@param length Length of the serialized event.
394
- @param description_event An FDE event, used to get the following information
396
+ @param description_event An FDE event, used to get the
397
+ following information
395
398
-binlog_version
396
399
-server_version
397
400
-post_header_len
@@ -447,7 +450,8 @@ class Stop_event: public Binary_log_event
447
450
- A slave writes the event to the relay log when it shuts down or when a
448
451
RESET SLAVE statement is executed
449
452
@param buf Contains the serialized event.
450
- @param description_event An FDE event, used to get the following information
453
+ @param description_event An FDE event, used to get the
454
+ following information
451
455
-binlog_version
452
456
-server_version
453
457
-post_header_len
@@ -557,7 +561,8 @@ class Incident_event: public Binary_log_event
557
561
558
562
@param buf Contains the serialized event.
559
563
@param length Length of the serialized event.
560
- @param description_event An FDE event, used to get the following information
564
+ @param description_event An FDE event, used to get the
565
+ following information
561
566
-binlog_version
562
567
-server_version
563
568
-post_header_len
@@ -610,8 +615,9 @@ class Xid_event: public Binary_log_event
610
615
{
611
616
public:
612
617
/* *
613
- The minimal constructor of Xid_event, it initializes the instance variable xid
614
- and set the type_code as XID_EVENT in the header object in Binary_log_event
618
+ The minimal constructor of Xid_event, it initializes the instance variable
619
+ xid and set the type_code as XID_EVENT in the header object in
620
+ Binary_log_event
615
621
*/
616
622
explicit Xid_event (uint64_t xid_arg)
617
623
: Binary_log_event (XID_EVENT),
@@ -623,7 +629,8 @@ class Xid_event: public Binary_log_event
623
629
An XID event is generated for a commit of a transaction that modifies one or
624
630
more tables of an XA-capable storage engine
625
631
@param buf Contains the serialized event.
626
- @param description_event An FDE event, used to get the following information
632
+ @param description_event An FDE event, used to get the
633
+ following information
627
634
-binlog_version
628
635
-server_version
629
636
-post_header_len
@@ -639,97 +646,6 @@ class Xid_event: public Binary_log_event
639
646
#endif
640
647
};
641
648
642
-
643
- /* *
644
- @class Rand_event
645
-
646
- Logs random seed used by the next RAND(), and by PASSWORD() in 4.1.0.
647
- 4.1.1 does not need it (it's repeatable again) so this event needn't be
648
- written in 4.1.1 for PASSWORD() (but the fact that it is written is just a
649
- waste, it does not cause bugs).
650
-
651
- The state of the random number generation consists of 128 bits,
652
- which are stored internally as two 64-bit numbers.
653
-
654
- @section Rand_event_binary_format Binary Format
655
-
656
- The Post-Header for this event type is empty. The Body has two
657
- components:
658
-
659
- <table>
660
- <caption>Body for Rand_event</caption>
661
-
662
- <tr>
663
- <th>Name</th>
664
- <th>Format</th>
665
- <th>Description</th>
666
- </tr>
667
-
668
- <tr>
669
- <td>seed1</td>
670
- <td>8 byte unsigned integer</td>
671
- <td>64 bit random seed1.</td>
672
- </tr>
673
-
674
- <tr>
675
- <td>seed2</td>
676
- <td>8 byte unsigned integer</td>
677
- <td>64 bit random seed2.</td>
678
- </tr>
679
- </table>
680
- */
681
- class Rand_event: public Binary_log_event
682
- {
683
- public:
684
- unsigned long long seed1;
685
- unsigned long long seed2;
686
- enum Rand_event_data
687
- {
688
- RAND_SEED1_OFFSET= 0 ,
689
- RAND_SEED2_OFFSET= 8
690
- };
691
-
692
- /* *
693
- This will initialize the instance variables seed1 & seed2, and set the
694
- type_code as RAND_EVENT in the header object in Binary_log_event
695
- */
696
- Rand_event (unsigned long long seed1_arg, unsigned long long seed2_arg)
697
- : Binary_log_event (RAND_EVENT)
698
- {
699
- seed1= seed1_arg;
700
- seed2= seed2_arg;
701
- }
702
-
703
- /* *
704
- Written every time a statement uses the RAND() function; precedes other
705
- events for the statement. Indicates the seed values to use for generating a
706
- random number with RAND() in the next statement. This is written only before
707
- a QUERY_EVENT and is not used with row-based logging
708
-
709
- <pre>
710
- The buffer layout for variable part is as follows:
711
- +----------------------------------------------+
712
- | value for first seed | value for second seed |
713
- +----------------------------------------------+
714
- </pre>
715
- @param buf Contains the serialized event.
716
- @param description_event An FDE event, used to get the following information
717
- -binlog_version
718
- -server_version
719
- -post_header_len
720
- -common_header_len
721
- The content of this object
722
- depends on the binlog-version currently in use.
723
- */
724
- Rand_event (const char * buf,
725
- const Format_description_event *description_event);
726
- #ifndef HAVE_MYSYS
727
- void print_event_info (std::ostream& info);
728
- void print_long_info (std::ostream& info);
729
- #endif
730
- };
731
-
732
-
733
649
/* *
734
650
@class Ignorable_event
735
651
@@ -767,7 +683,8 @@ class Ignorable_event: public Binary_log_event
767
683
{}
768
684
/*
769
685
@param buf Contains the serialized event.
770
- @param description_event An FDE event, used to get the following information
686
+ @param description_event An FDE event, used to get the
687
+ following information
771
688
-binlog_version
772
689
-server_version
773
690
-post_header_len
@@ -845,7 +762,10 @@ struct Uuid
845
762
// / Set to all zeros.
846
763
void clear () { memset (bytes, 0 , BYTE_LENGTH); }
847
764
// / Copies the given 16-byte data to this UUID.
848
- void copy_from (const unsigned char *data) { memcpy (bytes, data, BYTE_LENGTH);}
765
+ void copy_from (const unsigned char *data)
766
+ {
767
+ memcpy (bytes, data, BYTE_LENGTH);
768
+ }
849
769
// / Copies the given UUID object to this UUID.
850
770
void copy_from (const Uuid &data) { copy_from ((unsigned char *)data.bytes ); }
851
771
// / Copies the given UUID object to this UUID.
@@ -968,7 +888,8 @@ class Gtid_event: public Binary_log_event
968
888
969
889
@param buffer Contains the serialized event.
970
890
@param event_len Length of the serialized event.
971
- @param description_event An FDE event, used to get the following information
891
+ @param description_event An FDE event, used to get the
892
+ following information
972
893
-binlog_version
973
894
-server_version
974
895
-post_header_len
@@ -986,8 +907,8 @@ class Gtid_event: public Binary_log_event
986
907
: commit_flag (commit_flag_arg)
987
908
{}
988
909
#ifndef HAVE_MYSYS
989
- // TODO(WL#7684): Implement the method print_event_info and print_long_info for
990
- // all the events supported in MySQL Binlog
910
+ // TODO(WL#7684): Implement the method print_event_info and print_long_info
911
+ // for all the events supported in MySQL Binlog
991
912
void print_event_info (std::ostream& info) { }
992
913
void print_long_info (std::ostream& info) { }
993
914
#endif
@@ -1057,7 +978,8 @@ class Previous_gtids_event : public Binary_log_event
1057
978
</pre>
1058
979
@param buffer Contains the serialized event.
1059
980
@param event_len Length of the serialized event.
1060
- @param description_event An FDE event, used to get the following information
981
+ @param description_event An FDE event, used to get the
982
+ following information
1061
983
-binlog_version
1062
984
-server_version
1063
985
-post_header_len
@@ -1076,8 +998,8 @@ class Previous_gtids_event : public Binary_log_event
1076
998
: Binary_log_event (PREVIOUS_GTIDS_LOG_EVENT)
1077
999
{}
1078
1000
#ifndef HAVE_MYSYS
1079
- // TODO(WL#7684): Implement the method print_event_info and print_long_info for
1080
- // all the events supported in MySQL Binlog
1001
+ // TODO(WL#7684): Implement the method print_event_info and print_long_info
1002
+ // for all the events supported in MySQL Binlog
1081
1003
void print_event_info (std::ostream& info) { }
1082
1004
void print_long_info (std::ostream& info) { }
1083
1005
#endif
@@ -1133,7 +1055,8 @@ class Heartbeat_event: public Binary_log_event
1133
1055
1134
1056
@param buf Contains the serialized event.
1135
1057
@param event_len Length of the serialized event.
1136
- @param description_event An FDE event, used to get the following information
1058
+ @param description_event An FDE event, used to get the
1059
+ following information
1137
1060
-binlog_version
1138
1061
-server_version
1139
1062
-post_header_len
0 commit comments