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
I have a specific use case, where I would need to advertise two different server_version values because of a client issue. Other than the server_version, everything else is the same.
I currently run two separate ProxySQL instances, with one on a non-standard port, but I was thinking it might be useful to be able to override specific settings per listening port. ProxySQL can already listen on multiple ports, though the port can only be used as a value in query rules later on.
Thanks for considering this!
The text was updated successfully, but these errors were encountered:
mysql-server_version applies to all client connections.
The idea of supporting multiple "versions" based on different ports or interfaces makes absolutely sense.
I can think to at least 2 different implementations:
a new table, mapping interface/port to version
a new global variable, with a mapping of interface/port to version
The first implementation (new table) is over-complicated . It requires a new table, new hooks in cluster configuration, new checksums, etc
The second implementation (global variable) is a lot simpler.
So simple, that we don't even need a new global variable.
In fact, we could extend mysql-server_version in such a way that:
if the variable is a valid JSON mapping interface/port to version, use it that way
otherwise mysql-server_version is interpreted as a simple string and used as-is
Some considerations:
the JSON must also have a default value that applies to all interfaces not explicitly set (for example, Admin)
the format should look something like the following: {"default":"5.7.10","0.0.0.0:6033":"8.0.30","0.0.0.0:6032":"8.0.31","127.0.0.1:16033":"8.4.2"}
the JSON must be parsed only once when LOAD MYSQL VARIABLES TO RUNTIME is executed , or alternatively (perhaps better) when worker threads refresh their variables
we can store the mapping as an unordered_map , possibly in MySQL_Thread object
I have a specific use case, where I would need to advertise two different
server_version
values because of a client issue. Other than theserver_version
, everything else is the same.I currently run two separate ProxySQL instances, with one on a non-standard port, but I was thinking it might be useful to be able to override specific settings per listening port. ProxySQL can already listen on multiple ports, though the port can only be used as a value in query rules later on.
Thanks for considering this!
The text was updated successfully, but these errors were encountered: