Page MenuHomePhabricator

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

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

Details

Summary

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

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

Event Timeline

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