Upgrade to 1.6.0.158 fails with mysql 8.4.13
-
Ubuntu 26.04.1 has updated to mysql 8.4.13, where certain long data types cannot have default values.
Having updated my server to this release, upgrading FOG fails
mysql> ALTER TABLE `hosts` ADD COLUMN `hostSecTokenPrev` longtext NOT NULL DEFAULT '' AFTER `hostInfoLock`; ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'hostSecTokenPrev' can't have a default valueIt’s impossible to continue with the installation after this error
-
@MarkG Thanks for the report. This is a known defect in 1.6.0.158, and the fix is already on the dev-branch.
The cause: the schema update builds its column definitions from a MariaDB capture. MariaDB accepts a literal default on a TEXT column. MySQL does not (error 1101). The same upgrade also hits two other MySQL-only errors: 1305 (Ubuntu’s MySQL has no MD5()) and 1292.
PR #2121 fixes all three. On MySQL 8.0.13 and later, FOG now writes the TEXT default as an expression,
DEFAULT (''), which MySQL accepts. MariaDB is unchanged.The fix reaches the stable channel in the next monthly release on December 11. To get it now, re-run the installer from dev-branch in your FOG git checkout:
cd /path/to/fogproject git fetch origin git checkout dev-branch git pull cd bin sudo ./installfog.sh -yThe schema update compares your database to the expected structure and adds only what is missing, so it continues from where the failed run stopped. After the December 11 release,
git checkout stableputs you back on the stable line.If the installer stops again, please post the full error and the output of
mysql --version.