Re: is there a way to stream a file into a blob field?
Posted by: Reggie Burnett
Date: December 09, 2004 09:19PM

Currently no. This is something that I will add to future versions. One thing to keep in mind is when this feature is added, you will have to use .Prepare() on the command. The reason is not obvious.

MySql uses two different protocols for talking to the connectors. A binary protocol and an older text mode protocol. The text mode protocol is used for all commands except server side prepared statements. When using the text mode protocol, binary data has to be scanned and various bytes "escaped" so the server will not abort the submission early or see a ";" and think the submission is over.

Now, we certainly could stream in a FileStream using text mode protocol, but it wouldn't save us anything. We would still have to load the entire file in memory and then scan it for those characters. In the future, I hope to set things up so that large file contents can be written directly to the wire. This would allow you to feed blobs up to 2 gig without loading them up on the workstation first. But we are not there yet...

-reggie

Options: ReplyQuote


Subject
Written By
Posted
Re: is there a way to stream a file into a blob field?
December 09, 2004 09:19PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.