[MDEV-14432] mysqldump does not preserve case of table names in generated sql Created: 2017-11-17 Updated: 2023-07-19 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.0.26, 10.0, 10.1, 10.2.10, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Crimmins | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | Papercut, beginner-friendly | ||
| Environment: |
Windows 10 64bit MyISAM engine. |
||
| Issue Links: |
|
||||||||
| Description |
|
The table name in the sql file generated by mysqldump is in lowercase. This only happens if the command arguments include a table name. If run without specifying a table the case of the table names is preserved. From looking at logs, it appears as if earlier versions used "show tables like ..." and the later versions use "select from information_schema.tables where table_name = ....". Interestingly there is a different result between like and =
|
| Comments |
| Comment by Marko Mäkelä [ 2017-11-20 ] | ||||||||||||||||||||||||||||||
|
I think that this might be broken by InnoDB design. On Windows, InnoDB always converts table names to lower case. | ||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-11-20 ] | ||||||||||||||||||||||||||||||
|
It looks like you are using lower_case_table_names=2, is it so? (The default value on Windows is 1, so you must have changed it). Indeed, with lower_case_table_names=2, the difference between select ... = and select ... like is reproducible on Windows. Possibly it has something to do with different execution plans:
alice, | ||||||||||||||||||||||||||||||
| Comment by David Crimmins [ 2017-11-20 ] | ||||||||||||||||||||||||||||||
|
We are using lower_case_table_names=2 | ||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-11-21 ] | ||||||||||||||||||||||||||||||
|
on OS X 10.13 also different result of "like" and "="
| ||||||||||||||||||||||||||||||
| Comment by Sergei Kulakov [ 2020-05-05 ] | ||||||||||||||||||||||||||||||
|
I confirm the bug for Windows 8.1. This wasn't the case with MySql's mysqldump. | ||||||||||||||||||||||||||||||
| Comment by Sergei Kulakov [ 2020-05-08 ] | ||||||||||||||||||||||||||||||
|
I got | ||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-05-08 ] | ||||||||||||||||||||||||||||||
|
Versions of MariaDB where the bug is repeatable and where it should be fixed | ||||||||||||||||||||||||||||||
| Comment by Sergei Kulakov [ 2020-05-08 ] | ||||||||||||||||||||||||||||||
|
Ok, thank you, I thought they're all affected. Can't see those comments any more for a reason. |