Skip to content

Commit a4c69c1

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fix: add handling for MD5 on new MySQL and deprecate MD5 SQL function
1 parent abe4a2a commit a4c69c1

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/phpunit-mysql-sharding.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ jobs:
151151
echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
152152
echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
153153
154+
- name: Enable MD5 MySQL support
155+
run: |
156+
for PORT in 4444 5001 5002 5003 5004; do
157+
echo "INSTALL COMPONENT 'file://component_classic_hashing';" | mysql -h 127.0.0.1 -P $PORT -u root -prootpassword
158+
done
159+
154160
- name: Set up Nextcloud
155161
env:
156162
DB_PORT: 4444

lib/private/Setup/MySQL.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,8 @@ public function setupDatabase(): void {
4848
$version = $row['Value'];
4949
[$major, ] = explode('.', strtolower($version));
5050
if ((int)$major >= 9) {
51-
$connections = [$connection, ...$connection->getShardConnections()];
52-
foreach ($connections as $singleConnection) {
53-
$statement = $singleConnection->prepare("INSTALL COMPONENT 'file://component_classic_hashing';");
54-
$statement->executeStatement();
55-
}
51+
$statement = $connection->prepare("INSTALL COMPONENT 'file://component_classic_hashing';");
52+
$statement->executeStatement();
5653
}
5754
}
5855

0 commit comments

Comments
 (0)