Differential D21608 Diff 51440 src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | switch ($errno) { | ||||
// older versions just give us a key index ("key 2") so it's not | // older versions just give us a key index ("key 2") so it's not | ||||
// portable to parse the key out of the error and attach it to the | // portable to parse the key out of the error and attach it to the | ||||
// exception. | // exception. | ||||
throw new AphrontDuplicateKeyQueryException($message); | throw new AphrontDuplicateKeyQueryException($message); | ||||
case 1044: // Access denied to database | case 1044: // Access denied to database | ||||
case 1142: // Access denied to table | case 1142: // Access denied to table | ||||
case 1143: // Access denied to column | case 1143: // Access denied to column | ||||
case 1227: // Access denied (e.g., no SUPER for SHOW SLAVE STATUS). | case 1227: // Access denied (e.g., no SUPER for SHOW SLAVE STATUS). | ||||
throw new AphrontAccessDeniedQueryException($message); | |||||
// See T13622. Try to help users figure out that this is a GRANT | |||||
// problem. | |||||
$more = pht( | |||||
'This error usually indicates that you need to "GRANT" the '. | |||||
'MySQL user additional permissions. See "GRANT" in the MySQL '. | |||||
'manual for help.'); | |||||
throw new AphrontAccessDeniedQueryException("{$message}\n\n{$more}"); | |||||
case 1045: // Access denied (auth) | case 1045: // Access denied (auth) | ||||
throw new AphrontInvalidCredentialsQueryException($message); | throw new AphrontInvalidCredentialsQueryException($message); | ||||
case 1146: // No such table | case 1146: // No such table | ||||
case 1049: // No such database | case 1049: // No such database | ||||
case 1054: // Unknown column "..." in field list | case 1054: // Unknown column "..." in field list | ||||
throw new AphrontSchemaQueryException($message); | throw new AphrontSchemaQueryException($message); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |