[MDEV-32503] Queries from I_S.KEY_PERIOD_USAGE do not obey case-sensitivity Created: 2023-10-17 Updated: 2024-01-15 |
|
| Status: | In Testing |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Information Schema |
| Affects Version/s: | N/A |
| Fix Version/s: | 11.4 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Nikita Malyavin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
INFORMATION_SCHEMA.PERIODS (and at least some older I_S views, e.g. TABLES) work as expected with case-sensitive collations, but KEY_PERIOD_USAGE does not.
|
| Comments |
| Comment by Elena Stepanova [ 2023-10-17 ] | |||||||||||||||||||||||||||||||||
|
Looking further, there is much more inconsistency, even among old I_S views. | |||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2023-12-30 ] | |||||||||||||||||||||||||||||||||
|
I suppose that "it" tries to enumerate tables under the "TEST" directory, in case of PERIODS or KEY_COLUMN_USAGE. In case of KEY_PERIOD_USAGE, it's "test".
In case of KEY_PERIOD_USAGE, there is no lookup_field_vals->db_value, so it's not compared, but instead fetched by the root '.' directory enumeration. | |||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2023-12-30 ] | |||||||||||||||||||||||||||||||||
|
The reason for the different results was that for KEY_PERIOD_USAGE i didn't setup the correct fields for ST_SCHEMA_TABLE::idx_field1 So normally, none should work case-sensitively, but that's a different problem. | |||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2023-12-30 ] | |||||||||||||||||||||||||||||||||
|
elenst it seems that the behavior is controlled by lower_case_table_names rather than collation. I don't know whether this one is a bug or not | |||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2023-12-30 ] | |||||||||||||||||||||||||||||||||
|
please review commit e117ab01 | |||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2024-01-04 ] | |||||||||||||||||||||||||||||||||
|
e117ab01 is ok to push |