hassio-addons / addon-phpmyadmin

phpMyAdmin - Home Assistant Community Add-ons
https://addons.community
MIT License
28 stars 6 forks source link

SQL import only executes 100K of 250K lines #146

Open HansRemmerswaal opened 1 year ago

HansRemmerswaal commented 1 year ago

Problem/Motivation

I'm busy to migrate from SQLITE to MariaDB on my device running Home Assistant OS. I could not find a solution to automate this process so I exported the data as INSERT statements and used the phpMyAdmin to load these INSERT statements using drap and drop of the SQL. The file I dropped was statistics.sql, about 37kb and has 260714 lines. It processed in a reasonable time and finished without showing an error. When I checked only about 100K lines are in the table statistics. I have tried the same using a statistics.sql.zip, the result was similar but a little bit less records.

Checking the loaded data it looks like that after about 100K lines it stopped the execution of the INSERTs, so it's not that lines got skipped in the first 100K.

Expected behavior

I would expect that all the INSERT would be executed successfully

Actual behavior

After about 100K of the 260K lines the import stops without an error message.

Steps to reproduce

Export the statistics with +/- 260K records as INSERT statements. Empty the table statistics Drap and drop the SQL into phpMyAdmin Wait 5 - 10 min for the processing Check the table statistics

Proposed changes

Sample file

statistics.sql.zip

frenck commented 9 months ago

Most likely related to #142 and fixed in #206