Some mysql tools or protocols will emit special queries upon connection established. For example, sqlalchemy's SHOW VARIABLES LIKE 'sql_mode', DBeaver's SHOW WARNINGS or simply select 1. We are currently using regex to pattern matching these special federated queries, then return static, fake values, just like what Databend does. Instead of really executing them. It seems like a quick and dirty way to resolve the problems, but we are not trying to be compatible with the whole of mysql, so I think we can live with that. So I'm hesitating to label this issue as "wont fix" ...
An issue I found for the regex matching way is that it's too tight to tolerate whitespace. So perhaps a special handle after tokenizer is needed instead of matching plain text.
What type of enhancement is this?
Refactor
What does the enhancement do?
Some mysql tools or protocols will emit special queries upon connection established. For example, sqlalchemy's
SHOW VARIABLES LIKE 'sql_mode'
, DBeaver'sSHOW WARNINGS
or simplyselect 1
. We are currently using regex to pattern matching these special federated queries, then return static, fake values, just like what Databend does. Instead of really executing them. It seems like a quick and dirty way to resolve the problems, but we are not trying to be compatible with the whole of mysql, so I think we can live with that. So I'm hesitating to label this issue as "wont fix" ...Implementation challenges
No response