Repository navigation
fix(mysql-cdc): a negative TIME(1) or TIME(2) with a fraction is read from the binlog as stored (upstream: blackbeam/rust_mysql_common#200) - #816
Merged
Conversation
added 4 commits
November 4, 2026 06:56
…d as stored on the stream leg (open defect TF-1)
… from the binlog as stored (upstream: blackbeam/rust_mysql_common#200)
panchenkoai
enabled auto-merge
November 4, 2026 10:16
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 4, 2026
…-fraction # Conflicts: # tests/offline/known_red_guard.rs # tests/offline/rig_oracle_ratchet.rs
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 4, 2026
added 3 commits
November 4, 2026 16:13
panchenkoai
enabled auto-merge
November 4, 2026 15:39
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 4, 2026
panchenkoai
enabled auto-merge
November 4, 2026 16:32
added 3 commits
November 4, 2026 23:00
# Conflicts: # docs/roast-ledger.yaml # tests/offline/known_red_guard.rs # tests/offline/rig_oracle_ratchet.rs
# Conflicts: # tests/offline/known_red_guard.rs
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 5, 2026
…-fraction # Conflicts: # tests/offline/known_red_guard.rs # tests/offline/rig_oracle_ratchet.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A negative MySQL TIME(1) or TIME(2) with a fraction is read from the binlog as stored. mysql_common 0.37.3 (
binlog/misc.rs:35-39) doesfrac -= 0x100on au32: a debug rivet panics, a release rivet wraps to about 625 hours. rivet reads the rows of every table in the binlog, so one such row in any table stopped every debug MySQL CDC run on that server.The fix is a
[patch.crates-io]pin of a fork (rivet-lab/rust_mysql_common, rev a660b506, based on v0.37.3) that reads the fraction byte asi32. Upstream PR: blackbeam/rust_mysql_common#200. The pin is dropped when upstream releases a fixed mysql_common. Open defect cell came with #811.deny.tomllists the fork underallow-gitwith a dated reason, so the cargo-deny sources check admits it.Evidence
assertion left == right failed: stream differs from the source on negative TIME(1)/TIME(2) with a fraction,panicked at mysql_common-0.37.3/src/binlog/misc.rs:38:17,Summary 2 tests run: 1 passed, 1 failed, 2878 skipped.PASS live_cdc_mbt::mysql_cdc_negative_time_fraction_matches_the_snapshot,PASS live_cdc_mbt::mysql_cdc_time_values_beside_a_negative_fraction_match_the_source,Summary 2 tests run: 2 passed, 2878 skipped.tests/offline/mysql_binlog_time_fraction.rs: 3 passed with the pin, 1 passed and 2 failed without it.mysql-binlog-negative-time-fraction: with the patch applied the live cell fails (RIVET-ORACLE-FAIL) and the neighbour cell passes.1197 tests run: 1197 passed, 2873 skipped.Neighbours unchanged
Positive fractions, zero fraction, TIME(3..6), and plain TIME values beside a negative fraction decode as before (cell
time_values_beside_a_negative_fraction_decode_as_beforeand the live neighbour cell).Existing users
No state or format change. Rows that crashed a debug run are now read; in a release run, string columns that held the wrapped text before the upgrade are not rewritten. Remedy (in changelog.d): re-run the
initial: snapshotleg or a one-offmode: fullexport for affected TIME(1)/TIME(2) string columns.The refusal hint "declare the column
string" in src/source/cdc/value.rs is kept: it still works for TIME past a day (cell live_operator_contract.rs:3500).Ratchets raised
tests/offline/chunking_matrix_guard.rs,docs/fuzz-matrix.yamlentry 1 -> 2, pin sum 109 -> 110): the MySQLfuzz_cdc_wire_decoderow is agap(a property test over arbitrary binlog TIME bytes against the fork decoder is open, 2026-11-04); it is not a structuralna, because the fork is patched by rivet.Not verified
MySQL 5.7 and 8.4; release-profile behaviour of the wrap; full
make seeded-recallfor this seed with CONTROL; mutants; repeat x5; full live suite andmake open-defects(devbox); Docker image build;cargo deny checkwith the git dependency (cargo-deny is not installed on the Mac, CI runs it).See #811.