fix: reprompt for a fresh password after MySQL auth-expired reconnect#1846
Merged
datlechin merged 3 commits intoJul 10, 2026
Merged
Conversation
dc62292 to
31720c1
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes a reconnect bug for MySQL / MariaDB connections that are configured to prompt for a password at connect time.
When a temporary production session expires, TablePro can lose the connection and enter the auto-reconnect path. If the server then returns an authentication failure such as MySQL
1045/ SQLSTATE28000, the app was retrying with the stale in-memory password and could remain stuck in theConnectingstate instead of asking the user for a fresh password.Problem
Reproduction shape:
Prompt for Password.This is especially visible in short-lived production access workflows where developers receive a 30-minute or 60-minute password/session and must request access again after expiry.
Root Cause
The health-monitor reconnect flow reused
session.cachedPasswordfor reconnect attempts, but it did not distinguish between:As a result, the reconnect loop kept reusing the stale password for auth-expired sessions.
What Changed
Reconnect outcome handling
ConnectionHealthMonitornow supports three reconnect outcomes instead of a simple success/fail boolean:successretryabortAuthentication-aware reconnect recovery
DatabaseManagernow detects auth failures during reconnect using plugin error metadata and fallback message matching.1045,28000, and equivalent error text), prompt-for-password connections now request a fresh password.Manual reconnect path parity
Regression coverage
Changelog
[Unreleased]changelog entry describing the fix.User Impact
Before this change:
ConnectingAfter this change:
Scope / Non-goals
This PR intentionally only reprompts for the secret.
It does not reopen the full connection form or ask for a new username. The existing username is preserved, which matches the current connection model and keeps the fix scoped to the reconnect bug.
Validation
git diff --checkSuggested reviewer test plan
Prompt for Passwordenabled.Connecting.