Sql file execution error

dan's profile image dan posted 5 months ago in General Permalink

Hi, i was running a SQL file to migrate a database but i had this problem while doing so. See attachment.

Thank you.

dan's profile image dan posted 5 months ago Permalink

See attachment!

1 attachment(s):
  • run_file_sql
ansgar's profile image ansgar posted 5 months ago Permalink

I see that's the Linux version, and I did not include debug details in the last release, so the callstack in the screenshot is quite useless.

So, is there a specific SQL query you are suspecting to generate that crash, or anything else? Can you perhaps post the log lines from the bottom panel as well, up to the part where the crash happens?

dan's profile image dan posted 5 months ago Permalink

I'm attaching the image before executing the .sql file.

I'm including the English translation below because the language is Italian.

"Do you want to automatically detect the file's encoding? Automatically detecting a file's encoding is strongly discouraged. Data loss may occur if detection fails. Select the correct encoding before clicking Open to avoid this message."

When i click "Yes" it shows me the error from the previous post. Access violation.

If i click "Load SQL file," it always shows the message i translated for you and loads the SQL code into a query i can run. I click "Execute SQL" and it loads the data.

As long as it's a table for testing with 4 rows, it's fine.

I need to export a database with tables containing 10 million records, i don't think the editor supports billions of rows.

I'm also attaching the sql script that I'm trying to execute.

The database I need to import is MariaDB 11.8.x.

I'll explain how the new structure is configured: a Galera cluster, and the tables are encrypted. The new configuration also includes table encryption, which wasn't present in the old one.

Thank you

2 attachment(s):
ansgar's profile image ansgar posted 5 months ago Permalink

Ah, I see, yes. That's an issue in the Linux version currently. In the Windows version, that warning should tell you to select "UTF-8" or whatever in the file-open dialog. That dialog on Linux does not have an encoding selector, so you cannot select UTF-8, and HeidiSQL always uses its broken auto-detection, then crashes like above when it reads unsupported character combinations. See the dialog on Windows:

grafik.png

dan's profile image dan posted 5 months ago Permalink

It is not possible to do this in linux.

Doing this job with an app was more convenient than doing everything from the command line.

I could install HeidiSql in a Windows virtual machine that i will only use to perform the migration.

Thank you

ansgar's profile image ansgar posted 5 months ago Permalink

You could also try and edit the sql file and add a random UTF-8 character to the header comments, for instance

-- HeidiSQL Versione:            12.11.1.167 äöü

That way, HeidiSQL's auto-detection should return UTF-8, not ANSI or ASCII.

I just changed the encoding in the Lazarus branch, so files will always be detected as UTF-8, nothing else. The next HeidiSQL/Linux release will have that change.

dan's profile image dan posted 5 months ago Permalink

OK perfect!

Thanks

ansgar's profile image ansgar posted 2 months ago Permalink

Next Linux releases will have that encoding option in their file-open dialog:

image.png

Still need some bugfixes, but most of it is done.

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