You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correctness: global SSL version cache can return wrong values across connections. get_ssl_version caches a single value in CACHED_SSL_VERSION for the entire process, but status is per-connection. If the first call is against a non-SSL session (or a server that doesn’t expose Ssl_version), subsequent calls for other connections will always show None, even if they are SSL-enabled. This is a regression for multi-connection workflows or reconnects.
Path: mycli/packages/special/utils.py
Action: remove the cache, or key the cache by connection identity (e.g., cur.connection.thread_id() plus host/port), and allow recalc when the connection changes.
Correctness: cache “no row” sentinel permanently hides SSL version on other servers.
When no row is returned, the cache is set to '', so future calls never requery. If you connect to an older server first and then to a newer one, you’ll never display the SSL version.
Path: mycli/packages/special/utils.py
Action: same as above—avoid global cache or tie it to the connection.
Ensure values don’t leak across separate connection instances.
Suggested location: test/test_dbspecial.py or a new test alongside existing special/dbcommands tests.
Notes
I didn’t run tests locally. If you want, I can add the tests and adjust the caching logic.
Possible next steps
Remove or scope the SSL version cache per connection.
Add unit tests for SSL version reporting (including cross-connection behavior).
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
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.
Description
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).