debezium / debezium/dbz

Mysql Connector doesn't treat includedColumns well [DBZ-7591]

Open
#962 0 comments 0 reactions 0 assignees View on GitHub
component/mysql-connector migrated-from-jira type/bug
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-7591](https://issues.redhat.com/browse/DBZ-7591)

h1. Bug report
h2. What Debezium connector do you use and what version?

MySQL on version 2.2.1.Final
h2. What is the connector configuration?

No special configuration
h2. What is the captured database version and mode of depoyment?

On AWS, MariaDB 10.3.39
h2. What behaviour do you expect?

I expect sync to work.
h2. What behaviour do you see?

Rows are sent from MariaDB, but they don't contain all columns since database doesn't send all of them (not sure the reason why), after that, an exception is thrown from TableSchemaBuilder: 
 
Data row is smaller than a column index, internal schema representation is probably out of sync with real database schema
h2. Do you see the same behaviour using the latest relesead Debezium version?

No, but I haven't seen a code change that should fix it.
h2. Do you have the connector logs, ideally from start till finish?

No

{color:#151515}How to reproduce the issue using our {color}[tutorial|https://github.com/debezium/debezium-examples/tree/main/tutorial]{color:#151515} deployment?{color}

I have no idea since I see this against a customer DB and I haven't managed to replicate the issue locally even with the same database version, table schema and DML operations.

Contributor guide

Open the contributing guide

Research direction

Start at TableSchemaBuilder and inspect how includedColumns and incoming MariaDB rows are handled when the row has fewer columns than the schema. Try to reproduce through the linked tutorial deployment, then compare the received row with the internal schema. Done means synchronization completes without the column-index exception and the expected columns are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, mysql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.