[racket] Pulling BLOB from SQL DB
On 04/12/2012 01:02 PM, J G Cho wrote:
> While reading a BLOB from MySQL, DrRacket (5.2.1 on Win7) crashes
> every time. (SQL was like 'select blobcol from table LIMIT 1')
>
> Ran the same code via command line on Ubuntu. Racket seems to run out
> of memory due to the size of BLOB.
How big was the blob? I have have some fixes pending for blobs that
don't fit within a single MySQL "packet", but that limit is pretty low.
> Questions:
>
> How can I give more memory to /usr/local/bin/racket?
Just the standard "ulimit" command.
> Or more importantly,
> Is there a way to pipe PORTs (in from MySQL and out to file) such that
> Racket can handle 'very large' BLOBs?
No, that's not possible. But you can try retrieving the blob in separate
chunks (eg use the SUBSTR function with varying offsets).
Ryan