-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INFORMATION_SCHEMA tables are not ignored in TiDB #7347
Comments
I believe that the _get_tables function does not have a significant impact on this issue. I think this fix is a simple and effective way to address the issue. If you could submit a pull request, I would be happy to review it in more detail. Thank you for the great suggestion! 🎉😆 |
@snickerjp |
Thank you for your contribution! 以下は日本語です。 マージをしたので、クローズします。 |
Issue Summary
When connecting Redash to TiDB,
information_schema
is displayed as shown below.#5754
TiDB support was added in #5477.
In TiDB,
information_schema
andperformance_schema
schema are registered in uppercase.Additionally,
information_schema.columns
is case-sensitive, so the followingWHERE
clause cannot filter uppercase letters.redash/redash/query_runner/mysql.py
Lines 149 to 156 in 4357ea5
One possible solution is to use the
LOWER()
function to comparecol.table_schema
in lowercase.This change works without any issues in MySQL as well.
・SELECT results in TiDB
To be more specific, TiDB also has something called
METRICS_SCHEMA
.Technically, this should be excluded as well, but since it's not a reserved keyword in MySQL, excluding it would break compatibility.
However, it’s worth noting that
METRICS_SCHEMA
is only visible to users who are explicitly granted permissions to access the database, so it may not be a major concern.Steps to Reproduce
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
Technical details:
The text was updated successfully, but these errors were encountered: