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

[expired user #1502]'s profile image [expired user #1502] posted 7 years ago in General Permalink

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 9.5.0.5199 (it works in 9.5.0.5198 and before). In 9.5.0.5199 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 9.5.0.5199 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 9.5.0.5198 and check that the database dumped successfully.

Two screenshots attached (for HeidiSQL versions 9.5.0.5199 and 9.5.0.5199)

Thanks.

2 attachment(s):
  • HeidiDump9.5.5198
  • HeidiDump9.5.5199
[expired user #1502]'s profile image [expired user #1502] posted 7 years ago Permalink

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

ansgar's profile image ansgar posted 7 years ago Permalink

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

[expired user #1502]'s profile image [expired user #1502] posted 7 years ago Permalink

Done. Thanks.

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