Page MenuHomePhabricator

Inappropriate exception type thrown on failure to connect to MySQL server
Closed, ResolvedPublic


Client errors in DatabaseBase->query() are thrown as DBQueryError exceptions, even when the error is clearly related to connectivity, and would be better represented by a DBConnectionError exception. This way, we wouldn't give the goofy suggestion to run maintenance/update.php when we hit a 2013 ("Lost connection to MySQL server during query") client error.

Event Timeline

ori assigned this task to aaron.
ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added a project: Wikimedia-Rdbms.
ori added a subscriber: ori.

Change 229981 had a related patch set uploaded (by Aaron Schulz):
Avoid update.php suggestion on DB connection errors

Change 229981 merged by jenkins-bot:
Avoid update.php suggestion on DB connection errors

Actually using DBConnectionError has it's own pitfalls and changes needed, so the above change just fixes the error message string, which should be fine.