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
F18618037: D20780.diff
Sun, Sep 14, 11:00 PM
F18616380: D20780.id49551.diff
Sun, Sep 14, 5:20 PM
F18588696: D20780.id49547.diff
Fri, Sep 12, 1:13 AM
F18568358: D20780.diff
Wed, Sep 10, 12:03 AM
F18511831: D20780.diff
Fri, Sep 5, 7:08 AM
F18195123: D20780.id49547.diff
Sun, Aug 17, 2:02 PM
F18112290: D20780.diff
Aug 12 2025, 4:19 PM
F18053646: D20780.id49551.diff
Aug 4 2025, 5:18 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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable