Skip to content

A issue about the max-allowed-packet #186

@eshaoye

Description

@eshaoye

Hi,

I have a large "insert" sentence that is about 17MB. when I use mysql_api:execute/2 to execute the "insert", the return value is: "{error, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''/data/jenk' at line 1"}"
I am sure there is NOT a real syntax error in the "insert", I think the reason is that the "insert" is cut by the mysql server or by emysql driver.

But if I delete some part from the "insert" to make it less than 16MB, the "insert" can be executed successfully.

I have checked the parameter "max-allowed-packet" in mysql server, it is set to 20M.

And I can also see the macro "MAXPACKETBYTES" in emysql.hrl, it is 50000000, about 48MB.

Attached my large "insert" sentence.
1.txt

So is there any other parameters about this issue?

Thanks,
Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions