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
F19066678: D20780.diff
Sun, Nov 30, 5:55 AM
F19059074: D20780.id49547.diff
Sat, Nov 29, 4:13 AM
F18876828: D20780.diff
Nov 6 2025, 3:53 AM
F18854737: D20780.id.diff
Nov 1 2025, 12:31 AM
F18841788: D20780.id.diff
Oct 28 2025, 11:17 AM
F18826839: D20780.id.diff
Oct 24 2025, 5:56 AM
F18825655: D20780.diff
Oct 23 2025, 11:19 PM
F18791632: D20780.id49547.diff
Oct 16 2025, 4:25 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