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
Unknown Object (File)
Fri, Jul 4, 2:54 PM
Unknown Object (File)
Thu, Jul 3, 10:14 AM
Unknown Object (File)
Mon, Jun 30, 11:15 PM
Unknown Object (File)
May 14 2025, 1:23 AM
Unknown Object (File)
May 8 2025, 10:32 PM
Unknown Object (File)
Apr 30 2025, 6:04 PM
Unknown Object (File)
Apr 21 2025, 8:25 PM
Unknown Object (File)
Apr 15 2025, 10:32 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