You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HeidiSQL version: 12.6.0.6799 (latest nightly build available at this time)
Database type and version: MySQL 8.0.35
OS: Windows Server 2022 Standard
Describe the bug
I have a table named document containing binary data (8411 rows, 7GB in size).
When trying to copy the table to another database using the "Export Database as SQL" tool, HeidiSQL tries to fetch 10486 records (so the complete table data), but as it's over 7GB, it fails most of the time with a OOM error. I found this thread on the forum explaining where this 10486 number comes from.
Here's what I've looked at:
In the session manager, "Get full table status" is checked.
SHOW TABLE STATUS LIKE 'document'; works as expected. Avg_row_length shows 917116.
According to the calculation in the code, HeidiSQL should have tried to fetch 1170 records (1024 * 1024 * 1024 / 917116).
It looks like HeidiSQL considers Avg_row_length to be 0, but I haven't found why.
Short of having a Delphi license I don't think I can investigate further, but I'll be happy to give any details necessary.
To Reproduce
Open a connection to a MySQL Database
Export a table as SQL
Everytime HeidiSQL tries to fetch 10486 records, no matter what the Avg_row_length is
The text was updated successfully, but these errors were encountered:
It seems this bug is more random that I'd thought.
I have two similar servers, only the MySQL version is different by only one patch version:
Production system: Windows Server 2022 Standard, HeidiSQL 12.6.0.6799, and MySQL 8.0.34
Test system: Windows Server 2022 Standard, HeidiSQL 12.6.0.6799, and MySQL 8.0.35
My reproduction case as of now:
Open the connection to the MySQL Server as root user
Right-click on the document table, choose Export Database as SQL
For Table, select options Drop!! and Create
For Data, select Insert
For Max INSERT Size, leave 4096 as default
As target, select another Database on the same server and connection.
Production system
SHOW TABLE STATUS LIKE 'document'; shows 935921 for Avg_row_length
The SQL logs show SELECT * FROM document LIMIT 112;
Batchs seems to be 112, that seems correct according to what is computed in the code.
Test system
SHOW TABLE STATUS LIKE 'document'; shows 984525 for Avg_row_length
The SQL logs show SELECT * FROM document LIMIT 10486;
Batchs seems to be 10486, so it didn't use the Avg_row_length value.
The only difference I've found until now is the MySQL server version, but the changelog between the two version doesn't show any meaningful impact on the SHOW TABLE STATUS command.
Is there something else I can test to help investigate this further?
Preconditions
Describe the bug
I have a table named
document
containing binary data (8411 rows, 7GB in size).When trying to copy the table to another database using the "Export Database as SQL" tool, HeidiSQL tries to fetch 10486 records (so the complete table data), but as it's over 7GB, it fails most of the time with a OOM error. I found this thread on the forum explaining where this 10486 number comes from.
Here's what I've looked at:
SHOW TABLE STATUS LIKE 'document';
works as expected.Avg_row_length
shows917116
.To Reproduce
Avg_row_length
isThe text was updated successfully, but these errors were encountered: