Page MenuHomePhabricator

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

Authored by epriestley on Sep 3 2019, 7:23 PM.
Tags
None
Referenced Files
F22768301: D20780.diff
Mon, Oct 5, 2:19 PM
F22674115: D20780.id.diff
Thu, Oct 1, 8:38 PM
Unknown Object (File)
Mon, Sep 14, 2:20 PM
Unknown Object (File)
Sun, Sep 13, 10:37 AM
Unknown Object (File)
Sat, Sep 12, 12:23 PM
Unknown Object (File)
Aug 25 2026, 8:34 PM
Unknown Object (File)
Aug 9 2026, 3:03 PM
Unknown Object (File)
Jul 9 2026, 12:03 AM
Subscribers
None

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.