Re: How to insert a binary data size of 4GB into a longblob column.
Jim Winstead <[email protected]>
| Newsgroups | gmane.comp.db.mysql.odbc |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 08, 2007 at 10:46:44AM +0100, Martin Evans wrote: > What ODBC call are you using to insert the data? I think you need to > insert it in small chunks using SQLPutData. Unfortunately, the MySQL client/server protocol does not support sending a BLOB in chunks, so using SQLPutData() just results in the whole BLOB being buffered in the driver until is has all of the data and can send the the whole INSERT/UPDATE statement to the server. One way to work around this is to use the LOAD_FILE() function, but this requires the file be on the server host already. But the file still must be smaller than the max_allow_packet size. Another is to roll your own chunking of files on the server using multiple records. Obviously these aren't ideal solutions, but I'm not aware of any short-term plans to improve the protocol-level BLOB handling in MySQL. Jim Winstead MySQL Inc. -- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/[email protected]