SQLite Forum

Feature Request: support bulk value fetches
Login
Your assertion,

> Given that 'reader' threads are using a read-only connection, it doesn't seem possible that field data would change under their feet.

, reinforces a concern that I only obliquely mentioned before. In fact, that "field data" can change.  It changes as each row is fetched by step operations on any reading thread.  It changes when text of differing forms is requested via the [sqlite3_column_[value](...) APIs](https://sqlite.org/c3ref/column_blob.html). Until it is copied out, that data belongs to the prepared statement, which handles its memory management and alteration. If you read through the doc for those APIs (at the link), midway down under "Warning:", you will see: "Note that when type conversions occur, pointers returned by prior calls to sqlite3_column_blob(), sqlite3_column_text(), and/or sqlite3_column_text16() may be invalidated."  That is why I mentioned "[making] copies of values that can auto-magically change form under the covers" and later asked about lifetimes.