@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace SLAVE with REPLICA

Summary:
Since MySQL 8.0, the term slave was replaced with replica due to terminology.
This patch elevates the minimum MySQL version to 8.0.

Test Plan: Test the latest (9.3 for now) and LTS versions (8.0 and 8.4).

Reviewers: O1 Blessed Committers, avivey, mainframe98

Reviewed By: O1 Blessed Committers, avivey, mainframe98

Subscribers: aklapper, mainframe98, avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16107

Differential Revision: https://we.phorge.it/D26081

authored by

Minsoo Choo and committed by
Aviv Eyal
be6a3542 6bcc10fb

+7 -7
+1 -1
src/applications/config/check/PhabricatorDatabaseSetupCheck.php
··· 173 173 } 174 174 175 175 // NOTE: It's possible that replication is broken but we have not been 176 - // granted permission to "SHOW SLAVE STATUS" so we can't figure it out. 176 + // granted permission to "SHOW REPLICA STATUS" so we can't figure it out. 177 177 // We allow this kind of configuration and survive these checks, trusting 178 178 // that operations knows what they're doing. This issue is shown on the 179 179 // "Database Servers" console.
+1 -1
src/docs/user/cluster/cluster_databases.diviner
··· 143 143 144 144 To report this status, the user Phorge is connecting as must have the 145 145 `REPLICATION CLIENT` privilege (or the `SUPER` privilege) so it can run the 146 - `SHOW SLAVE STATUS` command. The `REPLICATION CLIENT` privilege only enables 146 + `SHOW REPLICA STATUS` command. The `REPLICATION CLIENT` privilege only enables 147 147 the user to run diagnostic commands so it should be reasonable to grant it in 148 148 most cases, but it is not required. If you choose not to grant it, this page 149 149 can not show any useful diagnostic information about replication status but
+1 -1
src/docs/user/installation_guide.diviner
··· 77 77 78 78 You will also need: 79 79 80 - - **MySQL**: You need MySQL. We strongly recommend MySQL 5.5 or newer. 80 + - **MySQL**: You need MySQL. The required version is MySQL 8.0 or newer. 81 81 You will need a server with multiple databases. 82 82 - **PHP**: You need a PHP engine: 83 83 - PHP 7 - 7.2.25 or newer.
+3 -3
src/infrastructure/cluster/PhabricatorDatabaseRef.php
··· 346 346 $t_start = microtime(true); 347 347 $replica_status = false; 348 348 try { 349 - $replica_status = queryfx_one($conn, 'SHOW SLAVE STATUS'); 349 + $replica_status = queryfx_one($conn, 'SHOW REPLICA STATUS'); 350 350 $ref->setConnectionStatus(self::STATUS_OKAY); 351 351 } catch (AphrontAccessDeniedQueryException $ex) { 352 352 $ref->setConnectionStatus(self::STATUS_REPLICATION_CLIENT); 353 353 $ref->setConnectionMessage( 354 354 pht( 355 - 'No permission to run "SHOW SLAVE STATUS". Grant this user '. 355 + 'No permission to run "SHOW REPLICA STATUS". Grant this user '. 356 356 '"REPLICATION CLIENT" permission to allow this server to '. 357 357 'monitor replica health.')); 358 358 } catch (AphrontInvalidCredentialsQueryException $ex) { ··· 386 386 $ref->setReplicaMessage( 387 387 pht( 388 388 'This host has a "replica" role, but is not replicating data '. 389 - 'from a master (no output from "SHOW SLAVE STATUS").')); 389 + 'from a master (no output from "SHOW REPLICA STATUS").')); 390 390 } else { 391 391 $ref->setReplicaStatus(self::REPLICATION_OKAY); 392 392 }
+1 -1
src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
··· 347 347 case 1044: // Access denied to database 348 348 case 1142: // Access denied to table 349 349 case 1143: // Access denied to column 350 - case 1227: // Access denied (e.g., no SUPER for SHOW SLAVE STATUS). 350 + case 1227: // Access denied (e.g., no SUPER for SHOW REPLICA STATUS). 351 351 352 352 // See T13622. Try to help users figure out that this is a GRANT 353 353 // problem.