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
F18826839: D20780.id.diff
Fri, Oct 24, 5:56 AM
F18825655: D20780.diff
Thu, Oct 23, 11:19 PM
F18791632: D20780.id49547.diff
Thu, Oct 16, 4:25 PM
F18779793: D20780.id49547.diff
Sat, Oct 11, 3:26 PM
F18779665: D20780.id49551.diff
Sat, Oct 11, 2:53 PM
F18734022: D20780.diff
Tue, Sep 30, 10:46 PM
F18679461: D20780.diff
Sep 26 2025, 12:51 AM
F18678391: D20780.diff
Sep 25 2025, 10:38 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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable