Eonblast / Emysql

Erlang MySQL driver
http://eonblast.github.com/Emysql
Other
434 stars 208 forks source link

A issue about the max-allowed-packet #186

Open eshaoye opened 7 years ago

eshaoye commented 7 years ago

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