feat: support doris server specie#1917
Conversation
| self.server_info = ServerInfo.from_version_string(conn.server_version) # type: ignore[attr-defined] | ||
| self._detect_doris() | ||
|
|
||
| def _detect_doris(self) -> None: |
There was a problem hiding this comment.
It would be preferable if this was cast as a utility method which returned a value rather than setting self.server_info as a side effect. What do you think?
There was a problem hiding this comment.
Good point! Refactored it into _probe_doris_version() which returns str | None (the Doris version string, or None if not Doris). The caller now handles constructing the ServerInfo. Thanks!
|
Hi! Thanks for the contributions. You can ignore the Codex failures. I need to update an API key. In this PR, we could also update the list of supported servers in the README. |
5acbff3 to
f9364d6
Compare
f9364d6 to
9d32067
Compare
Done! Updated README.md to include Apache Doris in the list of supported servers. |
|
Perfect! |
Description
Apache Doris implements the MySQL wire protocol and hard-codes
5.7.99as its handshake version string, making it indistinguishable from MySQL during connection. mycli previously identified Doris asMySQLwith a blank version.Fix: after every connection classified as
MySQL, run a lightweight probe:SELECT @@version_comment, @@versionIf
"doris"appears in either field (e.g.'Doris version doris-2.1.7-rc01'), extract the real version number and updateserver_infotoServerInfo(ServerSpecies.Doris, "2.1.7").Before / After:
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).