On Wed, Nov 30, 2005 at 05:10:19PM -0600, Jim Dodgen wrote: > > What do you get back (using the command-line client) when you > > ask for LENGTH(x) or QUOTE(x) instead of just the column x? > > sqlite> select length(val) from foo; > 3 > sqlite> select quote(val) from foo; > 'MZP' > > strange, reports a length of 3 but the database is > the size of the > file i put into the blob. other than the record in foo the database > is fresh and empty.
Although the problem is definitely with Perl here, SQLite's response _is_ pretty odd. The whole value of the BLOB gets inserted (since the length is set correctly by Perl), but since it is inserted as type TEXT, the retrieval (and the length) depend on the first NUL even though the entire blob is actually entered in the database. Probably not quite a bug, but maybe worth a spare thought. > I tried one ot the workarounds noted in > http://rt.cpan.org/NoAuth/Bug.html?id=14595 which had you force the > data type to SQL_BLOB this makes things work!! horray!! I'm glad something worked for you! In some ways that is probably a better solution than my patch, since it is more explicit. D. Richard Hipp <[EMAIL PROTECTED]> writes: > Matt Sergeant monitors this mailing list and should see your post. Thanks! --nate