Running sql file

BubikolRamios's profile image BubikolRamios posted 1 year ago in General Permalink

Attached file should be utf-8, tested on latest build of heidi, 10.3.39-MariaDB had to put innodb_strict_mode=0 into ini to work at all. Test without that ...

If you then copy/paste contence of attached file to query tab, it works. File/run sql file, crashes ...

file

ansgar's profile image ansgar posted 1 year ago Permalink

That file is no longer available on file.io:

The transfer you requested has been deleted

BubikolRamios's profile image BubikolRamios posted 1 year ago Permalink

file contence is produced by mysql dump, so all should be good, shrinked to problematic table

Hope this will work .... Click blue button PRENESI= download

note also, running from query tab:

Warnings from last query: Note: Storage engine InnoDB of the table test.test_table_zzz doesn't have this option

.....

ansgar's profile image ansgar posted 1 year ago Permalink

The crash is a stream read error, and it's caused by a malformed file encoding. I could fix it by

  1. using Notepad++ to change the file encoding from UTF-8-BOM to UTF-8
  2. Then using HeidiSQL to run the file. But in the file-open-dialog, I selected ANSI (not UTF-8!). The file then imports correctly.

So, although the file claims to be UTF-8 encoded, it's actually ANSI. I reversed that issue in the above step to fix that.

Notepad++ already shows the broken characters, e.g. at id=686:

Description

Opening the file with ANSI encoding fixed the broken characters in the resulting table:

Description

How did you create that broken file, exactly? You said with mysqldump, but that must be a super old version, right? Or you modified it later with an editor which ignored the encoding?

BubikolRamios's profile image BubikolRamios posted 1 year ago Permalink

It is super old mysql dump & modified to UTF-8 with Edit Pad pro. Will check Notepad ++. Thanks.

BubikolRamios's profile image BubikolRamios posted 1 year ago Permalink

Hmm, running original 5.6 GiB file (created on linux, old version of mysql) with ANSI, and no innodb_strict_mode=0, all went OK !

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