Bug #53902 | Connection lost trying to insert large text into longtext column | ||
---|---|---|---|
Submitted: | 21 May 2010 20:17 | Modified: | 24 May 2010 6:34 |
Reporter: | Farid Zidan (Candidate Quality Contributor) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 5.01.06.00 | OS: | Windows (XP SP3) |
Assigned to: | CPU Architecture: | Any | |
Tags: | qc |
[21 May 2010 20:17]
Farid Zidan
[23 May 2010 15:35]
Valeriy Kravchuk
Thank you for the problem report. Please, send my.cnf/my.ini file from your MySQL server. Alternatively, send the results of: show global variables like '%pack%';
[23 May 2010 16:23]
Valeriy Kravchuk
As you do not set max_allowed_packet value explicitly in my.ini, default is used: mysql> show variables like '%pack%'; +--------------------+---------+ | Variable_name | Value | +--------------------+---------+ | max_allowed_packet | 1048576 | +--------------------+---------+ 1 row in set (0.00 sec) So, there is no way to insert data longer than 1M. Please, check if you can insert data shorter than 1M in size successfully. Alternatively, you can try to execute: set global max_allowed_packet=128*1024*1024; on server, then reconnect your application and try again. Check http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_allowed_pac... for the details.
[24 May 2010 0:56]
Farid Zidan
I added: max_allowed_packet=1073741824 to my.ini and now the insert goes through with no error. Thanks. My concern with this issue is that a special configuration parameter needs to be added to allow client to insert large text values. I have already defined the columns as longtext when I created the table so I already told the server I want to store very large values in that column when I created the table. Also instead of the server terminating the client connection where the parameter is not large enough it would be more helpful to issue an informative error message and just fail the DML/insert so user can take corrective action. Just my two cents.