danpu icon indicating copy to clipboard operation
danpu copied to clipboard

Import problems

Open ClemensSahs opened this issue 11 years ago • 4 comments

In the case that a php variable is serialized in a field sometimes the import fails.

Currently I don't see why, I try to detect the problem, in the next days.

ClemensSahs avatar Apr 23 '14 08:04 ClemensSahs

One (or only) reason I see that is directly caused by the importer, could be new lines. The importer doesn't implement SQL spec, but buffers lines until it runs into a delimiter located at the end of a line. If a single (insert) statement spawns to multiple lines, you may get errors. Then there of course is query size limitations, and other server restrictions and security features, that apply to the importer.

gocom avatar Apr 26 '14 05:04 gocom

Yes I know, but I had in that moment not more time to debug this directly. I only try your tool and it throw that error. This week I will have more time to detect what exactly happen.

ClemensSahs avatar Apr 28 '14 07:04 ClemensSahs

The import() method only reads the first 4096 bytes of each line from the file. If a line is longer than that (and the export will produce lines longer than that) only part of a query will be read and executed.

Was going to submit a pull request - but it looks like this has been fixed. Which makes me wonder what version I just pulled from packagist!

drewm avatar Oct 13 '14 10:10 drewm

@drewm would this cause slow downs during Export? Can you send link to your version of the fix and highlight how this has been fixed in the current master?

ghost avatar Nov 19 '14 18:11 ghost