Jay Key wrote:
> I'm trying to load large blobs using the
> Connector/J drivers, and can't seem to find a
> combination of code that does the trick. It seems
> that the PreparedStatement.setBinaryStream()
> method actually attempts to allocate a byte array
> for the ENTIRE amount of data being stored. Is
> there any workaround to not have to read the whole
> file into memory?
Jay,
You have to use Connector/J 3.1.6 and MySQL-4.1 to not allocate the entire blob. Prior to MySQL-4.1, there was no way to send a blob in 'pieces' to the server, the protocol actually required the entire blob be sent all at once.
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html