Add prompt format string for SSL/TLS version#1601
Conversation
|
Findings
Missing tests / edge cases
Notes
If you want, I can draft a small test using a mocked cursor/connection to cover the cache key behavior. |
797de0a to
aa7e206
Compare
b7608a2 to
66e47af
Compare
|
Findings
Missing tests / edge cases
If you want, I can suggest concrete test additions in |
151f427 to
665e34d
Compare
"\T" will show the TLS version for the connection, or "(none)" when appropriate. The negotiated version seems to require a trip to the server, but get_ssl_version() has been cached per thread_id so that we don't need to make that trip for every prompt refresh. We also make the SSL version cache resistant to collisions by caching on the connection id as well as the thread id. Since the get_ssl_version() might get called on any prompt, we also wrap the query in a try block.
665e34d to
86ef86a
Compare
scottnemes
left a comment
There was a problem hiding this comment.
Verified new \T prompt value works with and without SSL enabled.
Description
\Twill show the TLS version for the connection, or(none)when appropriate.The negotiated version seems to require a trip to the server, but
get_ssl_version()has been cached perthread_idso that we don't need to make that trip for every prompt refresh.xref #1592
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).