Conversation
|
|
||
| mysql: | ||
| image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest # zizmor: ignore[unpinned-images] | ||
| image: mysql:${{ matrix.mysql-versions }} # zizmor: ignore[unpinned-images] |
There was a problem hiding this comment.
@nickvergessen as we now have a docker cache in place we do not run into problems with docker hub anymore. Do we still need to use our own images?
If yes I will prepare the new image.
There was a problem hiding this comment.
Is it more likely that we get hacked or mysql? :P
I guess both is fine
c06876a to
26e389f
Compare
- Version 8.0 is out-of-support. - Version 8.4 is now the oldest LTS. - New LTS is 9.7 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword | ||
| echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword | ||
|
|
||
| - name: Enable MD5 MySQL support |
There was a problem hiding this comment.
PS: Is this only needed in sharding? Or should it also be in phpunit-mysql?
And I guess we should change https://github.com/nextcloud/.github/blob/master/workflow-templates/phpunit-mysql.yml as well so apps start testing against it
There was a problem hiding this comment.
Only needed in sharding, for non sharded setup the installer will handle this.
But for sharded setup it needs to be done manually per shard.
For apps they should setup a fresh server, no? Because then the installer takes care of this.
| // for MD5 support | ||
| // In MySQL 9+ MD5 has been deprecated and is only available as a component. | ||
| // Until we dropped the support for it on the function builder, we need to load the component. | ||
| if ($connection->getDatabasePlatform() instanceof MySQL84Platform) { | ||
| $statement = $connection->prepare("SHOW VARIABLES LIKE 'version';"); | ||
| $result = $statement->executeQuery(); | ||
| $row = $result->fetchAssociative(); | ||
| $version = $row['Value']; | ||
| [$major, ] = explode('.', strtolower($version)); | ||
| if ((int)$major >= 9) { | ||
| // check if the component is already loaded, if not load it | ||
| $statement = $connection->prepare("SELECT COUNT(*) FROM mysql.component WHERE component_urn = 'file://component_classic_hashing';"); | ||
| $result = $statement->executeQuery(); | ||
| $count = $result->fetchOne(); | ||
| if ($count !== false && (int)$count === 0) { | ||
| // not yet loaded | ||
| $statement = $connection->prepare("INSTALL COMPONENT 'file://component_classic_hashing';"); | ||
| $statement->executeStatement(); | ||
| } | ||
| } | ||
| } |
Summary
documentation: nextcloud/documentation#15200
Checklist
3. to review, feature component)stable32)AI (if applicable)