[MDEV-30765] SHOW TABLES not working properly with lower_case_table_names=2 Created: 2023-03-01 Updated: 2023-06-07 Resolved: 2023-05-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows |
| Affects Version/s: | 10.6.12 |
| Fix Version/s: | 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5, 11.0.3, 11.1.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | dognose | Assignee: | Oleg Smirnov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | innodb | ||
| Environment: |
Windows Machine |
||
| Description |
|
I've encountered this issue first with mysql 5.7, When creating a user with table-based access, on a case-insensitive configuration (lower_case_table_names=2), the Statement
does only show tables, where the table names case matches the GRANT-Statement. Steps to reproduce (Windows machine, using lower_case_table_names=2):
SHOW GRANTS already returns the lower-case of the statements as for mysql 5.4:
log on with tester.
SHOW TABLES only shows the atable, where the table name is matching the GRANT-case. Querying both tables however works. But GRANT for Btable cannot be created with a upper-case B-letter. |
| Comments |
| Comment by dognose [ 2023-03-11 ] | ||||||||||||||||||||||
|
I'm raising the Priority of this to Critical as it has a huge impact in various situations. All Applications that rely on SHOW TABLES in order to build a browsable list of data-tables available
In fact, the presence of this bug doesn't allow to use any mysql-user account that has a limitation on Tables - if the tables are not named in lower case. (Unless the access method used works by querying directly without having to pick tables from an "available Tables" list) | ||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-03-30 ] | ||||||||||||||||||||||
|
privileges for SHOW TABLES are checked here:
and it does look like it doesn't take into account lower_case_table_names like it's done elsewhere. | ||||||||||||||||||||||
| Comment by Oleg Smirnov [ 2023-04-25 ] | ||||||||||||||||||||||
|
bar, please review branch bb-10.4-mdev-30765. | ||||||||||||||||||||||
| Comment by Alexander Barkov [ 2023-05-10 ] | ||||||||||||||||||||||
|
The patch | ||||||||||||||||||||||
| Comment by Oleg Smirnov [ 2023-05-11 ] | ||||||||||||||||||||||
|
Pushed to 10.4. | ||||||||||||||||||||||