On Thu, Oct 14, 2010 at 6:43 AM, Jens Miltner <[email protected]> wrote:

> I just stumbled across a problem where sqlite would be stuck for quite a
> long time inside sqlite3VdbeExpandSql when using bound BLOB parameters, i.e.
> my query looks like
>
> INSERT INTO foo VALUES (?,?,?,?...)
>
> and one of the parameters is a BLOB of about 700k.
>
> What I found is that when this query is executed, SQLite will actually
> produce a string representation of the BLOB, which is done using the
> following loop:
>
> >      assert( pVar->flags & MEM_Blob );
> >      sqlite3StrAccumAppend(&out, "x'", 2);
> >      for(i=0; i<pVar->n; i++){
> >        sqlite3XPrintf(&out, "%02x", pVar->z[i]&0xff);
> >      }
> >      sqlite3StrAccumAppend(&out, "'", 1);
>
> Any ideas / answers?
>

That only happens when you are using sqlite3_trace() to record the text of
each SQL statement as it is evaluated.  And that normally only happens
during debugging.



>
> Thanks,
> -jens
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to