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
F15462540: D20780.id49547.diff
Tue, Apr 1, 3:49 PM
F15461714: D20780.id49551.diff
Tue, Apr 1, 10:35 AM
F15458683: D20780.id.diff
Mon, Mar 31, 6:23 AM
F15458425: D20780.diff
Mon, Mar 31, 12:31 AM
F15439146: D20780.id49551.diff
Wed, Mar 26, 5:59 AM
F15391185: D20780.id49547.diff
Sat, Mar 15, 8:34 AM
F15292660: D20780.id49547.diff
Mar 5 2025, 2:43 AM
Unknown Object (File)
Feb 21 2025, 11:48 PM
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.