-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset the KEY_BLOCK_SIZE when migrating the MySQL engine and row format #2363
Conversation
Is setting |
According to https://bugs.mysql.com/bug.php?id=56628 it has been fixed 5.1.55 and 5.5.9. Before that fix, it did trigger a warning for invalid value, but the keyword seems valid. |
Is this also true when running in |
🤷 we'll never know… |
I think we should check for |
Then we cannot merge this PR, can we? We would risk breaking installations. |
I think we won’t break anything if we check the create options of the table as I suggested in #2363 (comment) If the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should check for
false !== stripos($tableOptions->Create_options, 'key_block_size=')
and only then addKEY_BLOCK_SIZE=0
to the query. This should still fix the issue but not create any warnings or errors.
See #2363 (comment)
PR updated accordingly. I have tested this on my customer's database, which worked correctly. To adjust the unit tests, I had to rewrite the |
That is intended. |
Can you explain why that would be intended? Except for we're too lazy to write tests 😝 |
The bundle is deprecated and will hopefully be replaced by the Contao Manager soon, therefore we had decided not to write tests and not to track coverage. |
that sounds fair. But doesn't that mean the installer should be moved to the core-bundle then? |
Probably yes. I think there is a ticket for that already. |
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
e08abec
to
6ee5442
Compare
I have a Contao 4.6 setup on a server that did not support InnoDB. Therefore, I configured the DBAL like so which worked for about 2 years now.
I could finally convince the client to move to a good hoster and also do an update to Contao 4.9. First step was to move the existing installation to the new hoster, on Contao 4.6 and with this DBAL configuration. Then I updated to Contao 4.9 and did run
contao:migrate
, which fails at migrating thetl_files
table:After a suggestion from @ausi I tried to set
ROW_FORMAT=DEFAULT
before changing the engine. Changing the row format worked, but I got a new error after that (this time in german due to phpMyAdmin).I did some digging on the internet and found the following to MySQL issues:
Apparently, my database table has a
KEY_BLOCK_SIZE
defined, but that's not supported by an DYNAMIC (uncompressed) row format. According to the second bug report, settingKEY_BLOCK_SIZE=0
is the correct way to remove that setting since MySQL 5.5.9