On Mon, May 14, 2012 at 5:45 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Mon, May 14, 2012 at 10:35 AM, Baruch Burstein <bmburst...@gmail.com > >wrote: > > > > > 2. How "static" does data have to be to be bound with SQLITE_STATIC? If > it > > won't change until the call to sqlite3_step, is that enough? How about > > until sqlite3_reset or sqlite3_clear_bindings? If all of those are not > > enough, I assume that if it doesn't change before the sqlite3_finalize, > it > > must be safe to use SQLITE_STATIC? > > > > SQLITE_STATIC means that the content must not change until after SQLite has > read it for the last time. You are guaranteed to be safe if you hold the > content unchanged until sqlite3_finalize(). You can probably get away with > changing the content sooner than that, but it depends on your > circumstances. Why push your luck? > For speed. I will be binding - stepping (it is an update statement) - resetting in a tight loop, possibly up to about a million times. -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users