Page MenuHomePhabricator

When "mysqli->real_connect()" fails without setting an error code, recover more gracefully

Authored by epriestley on Sep 3 2019, 7:23 PM.



Depends on D20779. Ref T13403. Bad parameters may cause this call to fail without setting an error code; if it does, catch the issue and go down the normal connection error pathway.

Test Plan
  • With "mysql.port" set to "quack", ran bin/storage probe.
  • Before: wild mess of warnings as the code continued below and failed when trying to interact with the connection.
  • After: clean connection failure with a useful error message.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Sep 3 2019, 7:23 PM
epriestley requested review of this revision.Sep 3 2019, 7:25 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 3 2019, 7:51 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.