On Thu, Jan 19, 2012 at 8:25 AM, John Elrick <[email protected]>wrote:
> > > On Thu, Jan 19, 2012 at 8:15 AM, Richard Hipp <[email protected]> wrote: > >> 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. >> > > > Thanks. Now this becomes weirder. I put breakpoints on all the locations > you mentioned and they were activated precisely as expected. When the > initial database is created, the breakpoints hit, but are not hit during > the actual load process. Yet, the first while condition in sqlite3_step: > > while( (rc = sqlite3Step(v))==SQLITE_SCHEMA > && cnt++ < SQLITE_MAX_SCHEMA_RETRY > && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){ > sqlite3_reset(pStmt); > assert( v->expired==0 ); > } > > is triggering sqlite3Reprepare like clockwork. So, given that none of the > listed conditions are occurring, what else could be causing sqlite3Step to > return SQLITE_SCHEMA? > Ok. It's NOT triggering sqlite3Reprepare like clockwork. I added a function to allow me to check the return value and sqlite3Reprepare is being called an appropriate number of times. So we're back to the original question, "why is sqlite3Parser calling _malloc so many times?" I have an idea of how to determine if any specific queries are to blame, but I have to work on something unrelated this morning. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

