On Tue, Jan 24, 2012 at 12:06 PM, Richard Hipp <d...@sqlite.org> wrote:

> On Tue, Jan 24, 2012 at 11:59 AM, John Elrick <john.elr...@fenestra.com
> >wrote:
>
> > While reviewing our other thread, I noticed a piece of information
> > concerning sqlite3ResetInternalSchema.  Based on the number of times
> that I
> > reported it had been called, I believe that something was changed between
> > 3.7.5 and 3.7.6 which causes sqlite3ResetInternalSchema to be called when
> > it wasn't in the earlier version.   Is there some kind of enumeration of
> > what events would cause sqlite3ResetInternalSchema to be called in
> version
> > 3.7.5 vs 3.7.6?
> >
>
> I agree that the fact that the triggers are being reparsed is a big hint.
> But we still don't know why they are being reparsed.  And we still cannot
> reproduce the problem in a command-line shell - in only seems to occur
> within your Delphi app.
>
> Can you put a breakpoint on sqlite3ResetInternalSchema() and figure out
> from whence it is being called so often?
>
>

Just did.  Most of the calls are bubbling up from _sqlite3_step which I
mentioned before.  There are no new changes to the schema immediately prior
to these calls.  Here is one example where step triggers a call to
sqlite3ResetInternalSchema() (apologies for using Delphi and our wrappers,
but I hope it's clear):

  itsSaveTabsheet :=
    itsDatabase.prepareExec('INSERT INTO TABSHEETS VALUES (null,
:workbookType, '
      + ':manifestOid, :surveyOid, :formDefinitionId, :prefKey, '
      + ':name, :originalName, :sequence, :columnList)');
...

function TDataServices.saveTabsheet(const tabsheetId, aWorkbookType,
manifestOid, surveyOid,
  formDefinitionOid, aPrefKey, aName, aSeq, aColumnList: string): string;
begin
  itsSaveTabsheet := itsSaveTabsheet;
  itsSaveTabsheet.bind(':workbookType', aWorkbookType);
  itsSaveTabsheet.bind(':manifestOid', manifestOid);
  itsSaveTabsheet.bind(':surveyOid', surveyOid);
  itsSaveTabsheet.bind(':formDefinitionId', StrToIntDef(formDefinitionOid,
0));
  itsSaveTabsheet.bind(':prefKey', aPrefKey);
  itsSaveTabsheet.bind(':name', aName);
  itsSaveTabsheet.bind(':originalName', aName);
  itsSaveTabsheet.bind(':sequence', aSeq);
  itsSaveTabsheet.bind(':columnList', aColumnList);
  itsSaveTabsheet.execute;
  result := IntToStr(itsDatabase.lastInsertRowId);
end;
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to