On Thu, Jan 19, 2012 at 8:10 AM, John Elrick <[email protected]>wrote:
>
> I've been reading through the code. Do I understand correctly that if one
> prepared statement binding is changed in such a way as may influence the
> choice of the query plan that all the prepared statements for that database
> connection are flagged for being re-prepared?
>
>
No. Only the one prepared statement whose binding changed is reprepared.
>
> SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db){
> Vdbe *p;
> for(p = db->pVdbe; p; p=p->pNext){
> p->expired = 1;
> }
> }
>
>
>
>
> >
> >
> >
> >
> > > On Thu, Jan 19, 2012 at 7:45 AM, Richard Hipp <[email protected]> wrote:
> > >
> > > > On Thu, Jan 19, 2012 at 7:41 AM, John Elrick <
> [email protected]
> > > > >wrote:
> > > >
> > > > > Question:
> > > > >
> > > > > If a query has already been prepared with sqlite3_prepare_v2, why
> > would
> > > > > sqlite3_step need to call sqlite3Prepare, which in turn calls
> > > > > sqlite3RunParser?
> > > > >
> > > >
> > > > Because the database schema changed. Or because you ran ATTACH or
> > > VACUUM,
> > > > either of which could potential change the bytecode necessary to run
> > the
> > > > statement. Or, because you changed the authorization callback.
> > > >
> > > >
> > > >
> > > > > _______________________________________________
> > > > > 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
> > > >
> > >
> > >
> > >
> > > --
> > > John Elrick
> > > Fenestra Technologies
> > > 540-868-1377
> > > _______________________________________________
> > > 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
> >
>
>
>
> --
> John Elrick
> Fenestra Technologies
> 540-868-1377
> _______________________________________________
> 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