Skip to content

Conversation

@percona-ysorokin
Copy link
Collaborator

https://perconadev.atlassian.net/browse/PS-10241

Added new template specializations for 'generic_post_header_impl' and 'generic_body_impl' for 'code_type::gtid_tagged_log' ('GTID_TAGGED_LOG' event).

Because MySQL 'GTID_TAGGED_LOG' event in contrast to any other event used in 8.4 server uses 'mysql::serialization' library with its own headers and structure
(https://github.com/mysql/mysql-server/blob/mysql-8.4.6/libs/mysql/serialization/readme.md) 'generic_body_impl<code_type::gtid_tagged_log>' constructor uses a bit different approach to unserialize data from the provided data portion.

Reworked 'util::extract_fixed_int_from_byte_span()` series of functions - they now have corresponding specializations for signed and unsigned types. Currently signed specializations do not support partial byte extractions when sizeof(T) != bytes_to_extract.

Added 'util::extract_varlen_int_from_byte_span_checked()' series of functions for extracting variable length integers (both signed and unsigned) based on the format used in 'mysql::serialization::detail'.

Fixed byte array used to represent 'server_version' field in 'generic_post_header_impl<code_type::format_description>' extracted into a generic typedef 'util::bounded_string_storage' with convenience functions. The same class is now used to represent 'tag' field in 'generic_body_impl<code_type::gtid_tagged_log>'.

https://perconadev.atlassian.net/browse/PS-10241

Added new template specializations for 'generic_post_header_impl' and
'generic_body_impl' for 'code_type::gtid_tagged_log' ('GTID_TAGGED_LOG' event).

Because MySQL 'GTID_TAGGED_LOG' event in contrast to any other event
used in 8.4 server uses 'mysql::serialization' library with its own headers and
structure
(https://github.com/mysql/mysql-server/blob/mysql-8.4.6/libs/mysql/serialization/readme.md)
'generic_body_impl<code_type::gtid_tagged_log>' constructor uses a bit
different approach to unserialize data from the provided data portion.

Reworked 'util::extract_fixed_int_from_byte_span()` series of functions - they now have corresponding specializations for signed and unsigned types.
Currently signed specializations do not support partial byte extractions when
sizeof(T) != bytes_to_extract.

Added 'util::extract_varlen_int_from_byte_span_checked()' series of functions
for extracting variable length integers (both signed and unsigned) based on
the format used in 'mysql::serialization::detail'.

Fixed byte array used to represent 'server_version' field in
'generic_post_header_impl<code_type::format_description>' extracted into a
generic typedef 'util::bounded_string_storage' with convenience functions.
The same class is now used to represent 'tag' field in
'generic_body_impl<code_type::gtid_tagged_log>'.
@percona-ysorokin percona-ysorokin merged commit f5aaf4c into main Nov 19, 2025
7 checks passed
@percona-ysorokin percona-ysorokin deleted the gtid_tagged_log_event branch November 19, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants