Error: MariaDB Event Logged Fewer Columns Than Defined
Issue
Syncs fail with the following error:
<X> columns were defined in the TableMapEvent, but the event logged only <Y> column values for table <table name>
Environment
Connector: MariaDB
Resolution
To resolve this issue, do the following:
- In MariaDB, check whether the
binlog_row_image
variable is set toFULL
on the primary and replica databases:SHOW VARIABLES LIKE 'binlog_row_image';
- If the value isn't
FULL
, update it. If it is already set toFULL
, restart the database or replication threads to apply the setting to all sessions. - If the issue persists, contact Fivetran support.
Cause
This issue occurs when the binlog_row_image
variable isn't set to FULL
on the primary and replica databases. When this happens, we may encounter a discrepancy in the number of columns defined for a table and the number of column values logged in the MariaDB binary log events, preventing us from capturing all columns.