Skip to content

fix(plugins): restore MySQL zero dates and keep session settings - #3427

Merged
datlechin merged 1 commit into
mainfrom
fix/mysql-zero-date-import
Oct 15, 2026
Merged

datlechin merged 1 commit into
mainfrom
fix/mysql-zero-date-import

Conversation

@datlechin

@datlechin datlechin commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Why

TablePro's MySQL dump set only the character set, unlike mysqldump. Under MySQL 8's default SQL mode its zero dates failed with 1292 (#3414), AUTO_INCREMENT 0 was renumbered and TIMESTAMPs shifted between time zones. Imports also left the file's settings on the editor's session.

Change

  • MySQL dumps carry mysqldump's SQL_MODE, FOREIGN_KEY_CHECKS and TIME_ZONE lines, are read in UTC under an empty SQL mode, and keep each routine, trigger and event's own SQL mode.
  • New PluginKit session scopes (additive, kit 38): imports put back what a file changed on MySQL and PostgreSQL (pg_dump's empty search_path included); MySQL to MySQL Object Copy and Transfer To keep zero dates, AUTO_INCREMENT 0 and TIMESTAMPs.
  • PostgreSQL dumps read ISO dates, postgres intervals and full float digits.
  • Imports stop claiming a rollback after MySQL committed a DDL; the MySQL driver refreshes its transaction flag after an error.

Verified

scripts/probes/check-mysql-dump-session.sh passes on MariaDB 13.0.2 and MySQL 8.4.11 and fails on the old prologue; check-postgresql-dump-session.sh passes on PostgreSQL 17.11. SQLExportEncodingTests became SQLExportSessionDeclarationTests.

Not in this PR

Fixes #3414

@datlechin
datlechin merged commit aa5fe81 into main Oct 15, 2026
8 checks passed
@datlechin
datlechin deleted the fix/mysql-zero-date-import branch October 15, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import fails when MySQL zero dates (0000-00-00) are present

1 participant