Styxis
Company
Knowledge

MySQL integer defaults: correct raw rows can hide an incorrect schema

Check raw rows and schema defaults separately.

Separate values from defaults

Check raw rows and schema defaults separately. A consumer that fills omitted fields should proceed only after the schema value matches the integer MySQL actually applies. A Truthound input table must keep those observations separate; correct populated rows cannot validate a default that another consumer will later use. [1, 2, 3]

What the report measured

Debezium #2763 reports precision loss in large MySQL integer schema defaults and different rounding of negative fractions. Captured raw rows were correct; Kafka sinks and the latest released version were not tested. The reported signed values are in range, and the test environment already included the BIT-default change, so this is a separate integer path. [1]

Compare the three paths

Test snapshot and streamed DDL paths separately with large integers and negative fractions, and hold consumers that fill missing fields from incorrect schema defaults. Join the SQL result, raw row obtained through getWithoutDefault and schema default by column and DDL phase. Preserve large integers as decimal strings without a floating-point preprocessing step. [1, 3]

The expected negative tie

For the illustrative INT default -1.5, define the source rounding result at the negative tie as -2. The expected decimal string is therefore -2. A schema value of -2 meets this condition; -1 fails. This declared comparison is not a new upstream execution result. [1, 3]

Compare exact representations

Truthound Core Python SDK 3.3.2 can compare prepared mysql_applied_decimal and schema_default_decimal with ColumnPairValidator using relationship="==". The operator establishes the type and applied default and supplies non-missing strings. The SDK does not change MySQL rounding or the Debezium parser; correct reported raw rows must not be relabeled as sink data loss. [1, 2, 3]

Start with default-using consumers

An alternative is to retest defaults on the corrected paths or require the consumer to provide explicit values. Consumers that already supply every field and never use schema defaults have a different exposure. Determine the real default-using paths before selecting a rollout response. [1, 3]

Application conditions

Keep SQL results and raw rows separate from schema defaults, and preserve large integers without floating-point preprocessing.

Alternatives

Test a verified correction or provide explicit values instead of relying on schema defaults.

Limitations

  • The SDK does not repair MySQL rounding or Debezium parsing; correct raw rows do not establish sink corruption.

Evidence

Event checked
Subject checked
Modified