-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
infoschema: Fix is.schemata to show correct charset/collation #7751
Conversation
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
mysql.DefaultCollationName, // DEFAULT_COLLATION_NAME | ||
catalogVal, // CATALOG_NAME | ||
schema.Name.O, // SCHEMA_NAME | ||
charset, // DEFAULT_CHARACTER_SET_NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to update the comment to remove the DEFAULT
prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand, the comment refers to the structure of is.schemata
. It remains correct with this patch:
mysql> SHOW CREATE TABLE schemata\G
*************************** 1. row ***************************
Table: SCHEMATA
Create Table: CREATE TABLE `SCHEMATA` (
`CATALOG_NAME` varchar(512) DEFAULT NULL,
`SCHEMA_NAME` varchar(64) DEFAULT NULL,
`DEFAULT_CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
`DEFAULT_COLLATION_NAME` varchar(32) DEFAULT NULL,
`SQL_PATH` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
1 row in set (0.01 sec)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
Fixes #7748
What is changed and how it works?
Prior to this fix, is.schemata used the global default charset, rather than the db specific default.
Check List
Tests
Code changes
Side effects
Unlikely
Related changes
None