I 100% would believe what you described in this comment is expected behaviour, it makes sense to me.
And yeah I was thinking about this a decent amount today and thought the only way you could even begin doing this is with thread local storage but could not think why they would do that concidering how widely supported (platform wise) sqlite is.
I think what you're describing is what I was confused about: sharing prepared statement objects across multiple threads.
It makes sense why it would not work but, at least in my case, it was an easy place to find myself when combining the "best practices" of prepared statements and a single shared connection.
Thanks for the clear interpretation of what's going on. Until now, it just seemed like a "gotcha." But I always knew it was user error and that sqlite was too battle tested for it to be a bug.
I 100% would believe what you described in this comment is expected behaviour, it makes sense to me.
And yeah I was thinking about this a decent amount today and thought the only way you could even begin doing this is with thread local storage but could not think why they would do that concidering how widely supported (platform wise) sqlite is.