[MDEV-20477] Merge binlog extended metadata support from the upstream Created: 2019-09-03  Updated: 2021-10-15  Resolved: 2019-09-11

Status: Closed
Project: MariaDB Server
Component/s: Replication
Fix Version/s: 10.5.0

Type: Task Priority: Major
Reporter: Sachin Setiya (Inactive) Assignee: Sachin Setiya (Inactive)
Resolution: Fixed Votes: 0
Labels: replication_event_metadata

Issue Links:
PartOf
is part of MDEV-19708 RBR replication loses data silently i... Stalled
Problem/Incident
causes MDEV-21063 Very many test failures on big-endian... Closed
Relates
relates to MDEV-26664 Store UUIDs in a more efficient manner Closed

 Description   

Merge the following upstream patches into MariaDB

commit c019294ca8fece7af3bca6e6190e4e1efafa22af
Author: Libing Song <libing.song@oracle.com>
Date:   Tue Feb 28 09:56:53 2017 +0800
 
    WL#4618 RBR: extended table metadata in the binary log
 
 
commit 80c33082d0d033ba35e9ddcd5b848f50e59a1aa4
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Mon Mar 6 11:36:05 2017 +0100
WL#4618 RBR: extended table metadata in the binary log
 
        Post-push fix: Fix Clang -Wtautological-constant-out-of-range-compare
 build warning.
 
 
commit 0cdb2d9c5882d3c1c698dfe4b31510c27deacd45
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Thu May 18 15:35:21 2017 +0100
 
 BUG#26020990 --PRINT-TABLE-METADATA DOES NOT DISPLAY ALL METADATA IN TABLE_MAP_LOG EVENT
 
 
commit e5b96670ed2aa075bab2eb33c6e5d675100979dd
Author: Sven Sandberg <sven.sandberg@oracle.com>
Date:   Fri Oct 12 10:58:35 2018 +0200
 
    BUG#28706307: CHARACTER SET OF ENUM DATA TYPE IS NOT AVAILABLE AS PART OF OPTIONAL METADATA
    BUG#28774144: MYSQLBINLOG --PRINT-TABLE-METADATA SHOW WRONG INFO ABOUT DEFAULT CHARSET
 

And also create a function virtual binlog_type_info() for field which contains relevant metadata (like binlog_type(), signnness , charset , geom_type)
For example

   uchar m_type_code;     // according to Field::binlog_type()
  /**
     Retrieve the field metadata for fields.
  */
   uint16 m_metadata;
   uint8 m_metadata_size;
   binlog_signess_t m_signess;
   CHARSET_INFO *m_cs; // NULL if not relevant
   TYPELIB *m_enum_typelib; // NULL if not relevant
   TYPELIB *m_set_typelib; // NULL if not relevant
   uchar m_geom_type; // Non-geometry fields can return 0

Usage:-
This functionality will be later used to implement MDEV-19708
binlog_type_info() function will be used in pluggable datatypes implementation



 Comments   
Comment by Sachin Setiya (Inactive) [ 2019-09-11 ]

https://github.com/MariaDB/server/commit/967c14c04e9e14062bd2b8288e054514af3cd322

Generated at Thu Feb 08 08:59:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.