On Tue Nov 28, 2017 at 10:34:03AM -0700, Keith Medcalf wrote: > > Datetime functions (that is, what constitutes "now") was, by default, > step-stable. The value is cached within the VDBE (statement object) > on its first use per-step and retains the same value until the VDBE > code yields a row. Re-entry on the next step used to reset "now". > > This was changed to per-statement stability and not per-step > stability, though exactly when this change occurred I do not recall > exactly (I believe it was made a SLOCHNG function when indexes on > functions were added). > > As I posted earlier you can patch the VDBE code to ensure that "now" > is always statement stable rather than step stable by only resetting > "now" on initial entry to the VDBE program (program counter == 0) > rather than unconditionally. Of course, the change that made "now" > statement stable renders this patch moot. > > In no case is now "transaction stable" as the value of now is cached > within the statement object (VDBE program) and not in the connection > object.
Thanks, that is quite informative. My original observations (transaction stable times) were wrong - I was looking at a bunch of trigger actions and forgot they were all part of one statement. My original comments/requests to the developers still apply though: - Can the documentation be updated to include something like Keith's description; and - Can we have some kind of control over whether 'now' is step-/statement-/real-time Regards, Mark -- Mark Lawrence _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users