[Sqlrelay-discussion] problems selecting BLOB data
Brought to you by:
mused
|
From: Devananda <kar...@ya...> - 2006-07-28 21:44:12
|
I've been trying different methods of inserting and selecting BLOB data through the PHP API from a MySQL 5.0.18 server, so far with mixed results. I'd like to be able to use prepared statements with stored procedures, but unfortunately, MySQL does not yet support that. So... What I've found is that inserting binary data through a prepared statement works very well, regardless of the size of the data. After changing mysqld's max_allowed_packet setting, I was able to insert a ~20M blob. However, reading binary data fails with large objects (100k or so), but works successfully with smaller objects. I have tried adjusting the 'maxquerysize', 'maxstringbindvaluelength', and 'maxlobbindvaluelength' configuration options in sqlrelay, to no effect. (AFAIK, these params only affect statements coming from the API, and do not pertain to result sets.) Something I find particularly telling is that, within the debug output of the sqlr-connection, I see "actual rows: 1" ... "fetching 0 rows". (I've pasted the debug output stream below.) I've looked in the api, connection, and cursor header files, but did not see any defines that seemed to pertain to this. Any suggestions where to look, or how to fix, or if I'm doing something wrong? Thanks, Devananda vdv > getting command... > done getting command > getting a cursor... > done getting a cursor > new query > handling query... > getting query... > querylength: > 42 > query: > SELECT v FROM test.blob_test WHERE k=3 > getting query succeeded > getting input binds... > done getting input binds > getting output binds... > done getting output binds > getting send column info... > send column info > done getting send column info... > processing query... > preparing/executing... > preparing query... > done preparing query > handling binds... > done handling binds > executing query... > done executing query > commit or rollback check... > done with commit or rollback check > processing query succeeded > done processing query > returning result set header... > returning row counts... > sending row counts... > actual rows: 1 > affected rows: -1 > done sending row counts > done returning row counts > column info will be sent > returning column counts... > done returning column counts > sending column type format... > id's > done sending column type format > returning column info... > v:45:2147483647 (-1,0) NOT NULL > done returning column info > returning output bind values > 0 > done returning output bind values > done returning result set header > handle query succeeded > returning result set data... > skipping 0 rows... > done skipping rows > fetching 0 rows... > done returning result set data |