SQL export is broken since 9.5.5199 on MySQL servers with lower_case_table_names set to 2

Misha v.3 posted 11 months ago in General

I have dev MySQL 5.7.19 installed locally (Windows 10 x64) with lower_case_table_names=2 in my.ini (for better compatibility with our prod *nix environment, this setting is NOT default for windows version of MySQL).

I have table and column names: Table, Table.Id, etc. With the setting for table 'Test' there are files 'Test.frm' and 'test2.ibd' on disk.

Dumping database using HeidiSQL worked fine until (it works in and before). In and above it shows errors for the tables with capitalized names: "Could not find table or view <db>.<lowercased table name>. Please refresh database tree." With lowercased table names all works fine.

How to reproduce:

  1. Add lower_case_table_names=2 into my.ini and restart MySQL (could be tricky if you already have databases)
  2. Run HeidiSQL or above
  3. Create database test
  4. Create tables in the database use simple script:
    CREATE TABLE test1 (Id INT);
    INSERT INTO  test1 (Id) VALUES (1);
    CREATE TABLE Test2 (Id INT);
    INSERT INTO  Test2 (Id) VALUES (2);

    Notice lowercased table name for one table and capitalized table name for another table.

  5. Refresh database tree
  6. RMB over database 'test' | 'Export database as SQL' | enter filename | 'Export'
  7. Notice that table 'test1' dumped successfully, but 'Test2' -- not. In error message HeidiSQL will show incorrect table name test.test2 (lowercased, should be test.Test2).
  8. Install HeidiSQL and check that the database dumped successfully.

Two screenshots attached (for HeidiSQL versions and


2 attachment(s):
  • HeidiDump9.5.5198
  • HeidiDump9.5.5199
Misha v.3 posted 11 months ago

I still can click on the table with capitalized name and use Data tab in Looks like the only Export is affected.

ansgar posted 11 months ago

Shit... Well, should be fixable. Could you be so nice and copy your post into a new issue on the bugtracker?

Misha v.3 posted 11 months ago

Done. Thanks.

Please login to leave a reply, or register at first.