Skip to content

bug: Tombstone the replaced cli/updatedb_convert_ms.php - #474

Merged
TheWitness merged 1 commit into
developfrom
fix/tombstone-updatedb-convert-ms
Nov 20, 2026
Merged

TheWitness merged 1 commit into
developfrom
fix/tombstone-updatedb-convert-ms

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

#471 replaced cli/updatedb_convert_ms.php with cli/upgrade_partitioning.php --convert-ms but did not tombstone the old file. Installs upgraded from the #449 build therefore keep the old script, and the 5.0 release notes still told users to run it.

The old script truncates syslog, syslog_incoming and syslog_removed, then runs ALTER ... MODIFY COLUMN logtime timestamp(3) in place. On a legacy table partitioned by RANGE (TO_DAYS(logtime)) over a DATETIME column, that fails:

CMDPHP ERROR: A DB Exec Failed!, Error: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed

This was reported on MariaDB 11.4.12, but it is not tied to that version: TO_DAYS() over a TIMESTAMP column is rejected on any MariaDB or MySQL version. By the time of the error, the tables had already been truncated.

Changes

  • manifest.json: add cli/updatedb_convert_ms.php to tombstones, so syslog_prune_files() removes it on upgrade.
  • docs/RELEASE_NOTES_5.0.md: describe cli/upgrade_partitioning.php --convert-ms (data preserved by default, --discard-data, legacy DATETIME limitation) and note that the old utility is replaced and removed.
  • CHANGELOG.md: entry under develop.

Validation

  • php tests/bin/validate-manifest.php passes.
  • I ran syslog_prune_files() against a temporary plugin tree using the new manifest: cli/updatedb_convert_ms.php was removed, cli/upgrade_partitioning.php was kept, and nothing was logged.

The prune runs only when the plugin version changes, so the file is removed at the next version bump.

#471 replaced cli/updatedb_convert_ms.php with
cli/upgrade_partitioning.php --convert-ms but did not tombstone it, so
installs upgraded from the #449 build keep the old script. It truncates
the message tables and ALTERs logtime to TIMESTAMP(3) in place, which
fails on legacy TO_DAYS(logtime) partitioned tables with "Constant,
random or timezone-dependent expressions in (sub)partitioning function
are not allowed".

Add it to manifest.json tombstones so syslog_prune_files() removes it on
upgrade, and point the 5.0 release notes at the replacement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 20:19
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the obsolete-converter cleanup and updated migration guidance.

No open issues 🎉

What changed in this PR

Completes the cleanup from #471 by marking the obsolete, destructive timestamp converter for removal and directing users to the safer replacement.

Changes:

  • Adds cli/updatedb_convert_ms.php to the tombstones for removal on the next version-triggered upgrade.
  • Updates release notes to describe the preserving conversion command, explicit data-discard option, and legacy DATETIME limitation.
  • Records the cleanup in the develop changelog.
File Description
manifest.json Marks the obsolete converter for upgrade-time removal.
docs/​RELEASE_NOTES_5.0.md Replaces outdated conversion guidance with the supported command and its limitations.
CHANGELOG.md Documents the tombstone and replacement command.

Review effort: Balanced

@TheWitness
TheWitness merged commit d6ce468 into develop Nov 20, 2026
12 checks passed
@TheWitness
TheWitness deleted the fix/tombstone-updatedb-convert-ms branch November 20, 2026 21:04
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.

3 participants