Repository navigation
Conversation
…sensitive The 2026_10_11 migration converted file_groups.file to utf8mb4. On a MyISAM table with a utf8mb3 column that widens the indexed VARCHAR(255) to 1020 bytes, past the MyISAM key limit of 1000, and the update stops with error 1071. Change only the collation, to the binary one of the column's own character set, named as the server spells it (utf8_bin on MySQL 5.7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The same migration code is used here, so the MySQL collation lookup blocker noted in #2675 applies to 3.6.x as well. Please carry over the SQL-mode-independent suffix check and the regression test to this branch before merging. — SokilAI |
…QL engines in CI MyISAM is a supported engine: the installers write it for older servers and sites keep it, often with a utf8 (utf8mb3) connection. The file_groups migrations now respect its 1000-byte key limit: - core/includes/file_groups_schema.php, loaded by path: the engine and charset a new table gets, bytes per character, the binary collation as the server names it (RIGHT(), not LIKE '%\_bin', which matches nothing under NO_BACKSLASH_ESCAPES), and the longest `file` the unique key allows. - The create migration (both copies) declares the binary collation itself and, on MyISAM with utf8mb4, creates `file` as VARCHAR(249). - 2026_10_11 keeps the column length as well as its charset. - 2026_12_05_000000_restore_file_groups_indexes puts back the indexes a create that hit the key limit left out, drops the duplicates it let in, and keeps rows whose path is longer than the key allows. CI: an install leg on MySQL with MyISAM, a nightly upgrade of a site turned MyISAM / utf8mb3 (legacy-myisam.php), smoke checks for the file_groups key and collation and the engine of every table, and FileGroupsMysqlTest run against a real server (EVO_TEST_MYSQL) in both SQL modes. AGENTS.md lists the rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Carried over in c9ea053: the same One thing specific to 3.6: the new MyISAM CI legs stop in the bundled
Both are past the MyISAM limit of 1000 bytes. Until sTask sizes those columns, a 3.6 install on MyISAM and an upgrade of a MyISAM 3.5 site to 3.6 fail with 1071, and these legs stay red. The PR description has the probe results. |
|
The sTask side is in Seiger/sTask#30. It sizes the indexed columns so every key fits the MyISAM limit, repairs tables a failed MyISAM create left without keys, and makes the models refuse longer values. With that branch in place of the vendor copy, the 3.6 MyISAM install and the MyISAM / utf8mb3 upgrade from 3.5.7 pass every MySQL check locally. Once it is released, this PR needs the lock bumped. |
3.6 copy of #2675: the migrations, the helper, the tests, the CI legs and the
AGENTS.mdsection are the same files on both lines.An update from 3.5.9 stops in
2026_10_11_000000_make_file_groups_file_case_sensitivewhenfile_groupsis a MyISAM table with a utf8mb3 column (an older site on MySQL 8.0, connection configengineMyISAM,charsetutf8):The migration converted the column to utf8mb4 on the way to a binary collation. That widens the indexed
VARCHAR(255)from 765 to 1020 bytes, past the MyISAM key limit of 1000.make:site finishstops there: the new files are in place, but the update seeders, the Extras module, the settings version and the removal ofinstall/never run, so the manager reports the leftover install folder.MyISAM is a supported engine, not a legacy one: the installers write it into the connection config for servers older than MySQL 5.7.6, and sites keep it. Checking the whole chain on MyISAM found a second gap: on a MyISAM site with a utf8mb4 connection, even a fresh install failed. The create migration's unique key
(document_group, file VARCHAR(255))needs 4 + 1020 bytes. The table stayed behind without its indexes, and the next migrate skipped it (hasTable()) and reported success.Changes
core/includes/file_groups_schema.php, loaded by path (a migration must not depend on a classmap rebuild). It provides:utf8resolves toutf8mb3on MySQL 8.0.30+);utf8_binon 5.7,utf8mb3_binon 8.0);filethe unique key allows (249 for MyISAM with utf8mb4, 255 otherwise).2026_10_11changes only the collation, keeping the charset and the length.2026_10_11has nothing left to do on a new site;fileasVARCHAR(249)on MyISAM with utf8mb4. The unique key still covers the full, case-exact path, with no prefix.2026_12_05_000000_restore_file_groups_indexes(new, idempotent):fileonly when no stored path is longer;RIGHT(COLLATION_NAME, 4) = '_bin'. UnderNO_BACKSLASH_ESCAPES,LIKE '%\_bin'matched nothing on MySQL 8.0.46 and 9.7.4, and the migration would have been recorded without changing anything. The CI scripts match the table prefix withLEFT()for the same reason.ci.yml: an install leg on MySQL with MyISAM (EVO_DB_ENGINE), whose updater pass replays the chain over it.upgrade.yml: a nightly / on-demand leg (legacy: myisam) that turns the older site into MyISAM / utf8mb3 before upgrading it (legacy-myisam.php).smoke.phpchecks thefile_groupsunique key and binary collation on MySQL, and the engine of every table when one was asked for.FileGroupsMysqlTestthere (EVO_TEST_MYSQL).AGENTS.md: a "Migrations on MySQL: MyISAM and older charsets" section with the rules behind this (key budget per engine and charset, change only what the migration is for, server-named collations, repair after a partial create, both migration copies, CI legs).A site already stuck on it can finish before this is released:
php artisan make:site finishincore/.Tests
FileGroupsStorageEngineTest(SQLite, always runs): key budget per engine and charset, engine/charset resolution, server collation names, the generatedALTER, both copies of the create migration, and the three migrations on SQLite.FileGroupsMysqlTest(needsEVO_TEST_MYSQL), in the default SQL mode and underNO_BACKSLASH_ESCAPES:_bin;VARCHAR(249), all indexes;FileGroupsMysqlTeston the 3.6 tree against MySQL 9.7: all pass.mysql:9.7on the 3.5 line (fix(migrations): keep the file_groups charset when making paths case-sensitive #2675); on 3.6 see the sTask note above:file_groupsmade MyISAM utf8mb3, 3.5.12 laid over it.make:site finishfails as above. Laying this branch over it, or applying the manualALTERon 3.5.12, completes it: exit 0,install/removed, no pending migrations.🤖 Generated with Claude Code