Skip to content

[rc-1.6.0] Schema: repair lossless type drift, and gate a real 1.5 upgrade - #2008

Merged
mastacontrola merged 2 commits into
rc-1.6.0from
fix/reconciler-lossless-widen-rc
Oct 28, 2026
Merged

mastacontrola merged 2 commits into
rc-1.6.0from
fix/reconciler-lossless-widen-rc

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Port of #2007 to rc-1.6.0, with its regenerated catalog commit. Both cherry-picks applied cleanly.

On this branch, tests/schema-reconciler-lossless-repair.test.php passes 20 of 20. tests/upgrade-from-15-ci.test.sh passes from stable (c97e205): schema 446, no drift, and every AUTO_INCREMENT intact.

Refs #2000

🤖 Generated with Claude Code

mastacontrola and others added 2 commits October 28, 2026 14:18
A 1.5 server's schema count lands on a different 1.6 step whenever 1.5
adds one, and the updater skips every 1.6 step below it. plan() puts back
the tables and columns those steps created, but a step that changed an
existing column's type was lost, and only shapeDrift() reported it. That
is how users.uName kept 1.5's varchar(40) (GH-2000).

repairShape() now applies the drift that cannot lose data: a longer
varchar/char/varbinary/binary, a wider integer of the same signedness,
and NOT NULL -> NULL. The MODIFY keeps the live column's charset,
collation and AUTO_INCREMENT. Everything else stays report-only. It runs
before the foreign keys, since a widened child is what lets one land.

tests/upgrade-from-15-ci.test.sh installs the schema with 1.5's own
updater (from origin/stable by default), upgrades with this tree's real
updater, both served by Apache in a php:7.4 container, and fails on an
update error, a short version, shape drift, or a lost AUTO_INCREMENT.
Without a database it skips. It fails on each of the three defects found
today: the pre-#2001 tree at step 290, this repair without AUTO_INCREMENT
at step 419, and the tree without this repair on the two users columns.

Refs #2000

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mastacontrola
mastacontrola merged commit a84872a into rc-1.6.0 Oct 28, 2026
13 checks passed
@mastacontrola
mastacontrola deleted the fix/reconciler-lossless-widen-rc branch October 28, 2026 19:28
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.

1 participant