dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.42k stars 661 forks source link

System variables cannot be SELECTed (e.g. @@version_comment) #958

Closed jeffreytse closed 3 years ago

jeffreytse commented 3 years ago

Description

Exactly, this MySQL bug was fixed on 5.0.22 Bug #15684, otherwise we will catch an exception 1193, "Unknown system variable 'VERSION_COMMENT'")

This PR has fixed the issue #957.

Checklist

gfrlv commented 3 years ago

You say yourself it was fixed in 5.0.22, but the check is < 5.1. Could you use the precise version?

gfrlv commented 3 years ago

@jeffreytse we are leaning towards merging #940. It removes the version queries altogether, in favor of parsing the version string as reported by pymysql. That would also circumvent the bug with @@version_comment. I'd be interested in your opinion on that PR too.

jeffreytse commented 3 years ago

@pasenor I'd be happy to discuss with you, hope this can help for the awesome project, and the historical mysql bug I have mention by the code comments. Thanks and regards.

j-bennet commented 3 years ago

Closing in favor of https://github.com/dbcli/mycli/pull/940.

Nice work on this fix @jeffreytse, thanks a lot! But I thought that 940 was a better solution, because it also lets us reduce the number of startup queries. Quicker startup, and less chance to run into a query error.