Repository navigation
Conversation
MyISAM allows 1000 bytes per index key. The indexed VARCHAR(255) columns need 1020 in utf8mb4, and s_tasks (identifier, action) is over the limit even in utf8mb3, so installing sTask on a MyISAM site stopped with error 1071. The create then left its table behind without keys, and the next migrate skipped the existing table (hasTable) and recorded it. - Create migrations size the indexed strings so every key fits: identifier 128, scope 128, action 96, priority 16. - 2026_12_06_000000_fit_indexed_columns_to_myisam restores missing indexes on MySQL: it shortens a column only where no stored value is longer, and skips a unique key whose rows share a value; tables with all keys stay as they are. - The models refuse longer values (FitsIndexedColumns, INDEXED_LENGTHS), and the task API validates them, so a non-strict session never cuts them. - tests/myisam.php: lengths, key budget and the guard always; installs on MyISAM utf8mb4/utf8mb3 and InnoDB and the repair with STASK_TEST_MYSQL. tests/bootstrap.php maps every class of the checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…repair - FitsIndexedColumns checks only values being written, so a row stored before the limit in a 255-character column can still be updated. - The repair passes each column's own collation to the MODIFY; without it MySQL moves the column to the table default. - run.php starts myisam.php in its own process: heartbeat.php declares a stub sWorker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Installing sTask on a MyISAM site stops with:
MyISAM is a supported Evolution CMS engine: the installers write it into the connection config for older servers, and sites keep it, often with a
utf8(utf8mb3) connection. It allows 1000 bytes per index key. The indexedstring()columns areVARCHAR(255), which takes 1020 bytes in utf8mb4.s_tasks (identifier, action)is over the limit even in utf8mb3 (1530 bytes).Since #27-#29 each create is guarded by
hasTable(). So the failed create leaves its table behind without keys, and the next migrate skips it and records it as done: workers and tasks are then stored with no unique key and no indexes.Found with the MyISAM CI legs added in evolution-cms/evolution#2675 / evolution-cms/evolution#2676. On 3.6 the bundled sTask v2.3.2 makes both legs fail: a 3.6 install on MyISAM, and the upgrade of a MyISAM 3.5 site.
Changes
identifier: 128 (workers, tasks, supervisor states)scope: 128action: 96 (identifier+action= 896 bytes)priority: 16class,supervisor_key) stay 255.2026_12_06_000000_fit_indexed_columns_to_myisam(MySQL / MariaDB only, idempotent). For each table missing any of the create migrations' indexes:FitsIndexedColumns(withINDEXED_LENGTHSonsWorker,sTaskModel,sSupervisorState) refuses to save a longer value; a non-strict MySQL session would cut it silently, and the worker or task would no longer be found.sTaskController::create()validates the same limits.tests/myisam.php, documented intests/README.md.tests/run.phpstarts it in its own process, becauseheartbeat.phpdeclares a stubsWorker.tests/bootstrap.phpnow maps every class of the checkout. Before, it mapped only classes the site's authoritative class map already knew, so a new class such as the trait could not load.Tests
tests/myisam.php, always:tests/myisam.php, withSTASK_TEST_MYSQL:tests/*.php: the same result as on2.x.metrics_memory.phpandnavigation-aside.phpfail in my environment on2.xtoo.tests/run.phpalready fails on2.xon twocomposer.jsonassertions: it expects^3.5.7and^1.3, while the file requires^3.5and*. Not touched here.🤖 Generated with Claude Code