Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-05 Thread Maxim Khitrov
On Wed, Nov 5, 2014 at 7:10 PM, nicolas riesch wrote: > Pardon me, I will try to reformulate my question more clearly. > > My scenario: > > - sqlite is set to Multi-thread mode (SQLITE_THREADSAFE=2), or Serialized > mode (SQLITE_THREADSAFE=1) > - I create N logical

[sqlite] Segfault in sqlite3DbMallocRaw

2014-06-13 Thread Maxim Khitrov
Hi all, I don't think this is a problem with sqlite, but I'm also not sure what external behavior could trigger this, so I'm looking for help from someone more familiar with the sqlite internals. One of the users of my SQLite binding for Go is reporting a non-deterministic segfault in the 3.8.5

Re: [sqlite] question about proper use of prepare_v2()

2013-07-27 Thread Maxim Khitrov
On Sat, Jul 27, 2013 at 2:04 AM, Stephan Beal wrote: > Hi, all, > > i'm porting some code from one sqlite3-using project (Fossil SCM) to > another sqlite3-using project (a prototype for Fossil v2) and i came across > this code snippet: > > while( rc==SQLITE_OK && z[0] ){

Re: [sqlite] Prepared statement invariants

2013-06-14 Thread Maxim Khitrov
On Fri, Jun 14, 2013 at 12:56 PM, Maxim Khitrov <m...@mxcrypt.com> wrote: > On Thu, Jun 13, 2013 at 9:27 PM, Igor Tandetnik <i...@tandetnik.org> wrote: >> On 6/13/2013 9:15 PM, Maxim Khitrov wrote: >>> >>> This works and also triggers SQLITE_SCHEMA with v

Re: [sqlite] Prepared statement invariants

2013-06-14 Thread Maxim Khitrov
On Fri, Jun 14, 2013 at 1:16 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > > On 14 Jun 2013, at 5:56pm, Maxim Khitrov <m...@mxcrypt.com> wrote: > >> Unconditionally invalidating the cache after each initial call to step >> will add a bit of overhead when

Re: [sqlite] Prepared statement invariants

2013-06-14 Thread Maxim Khitrov
On Thu, Jun 13, 2013 at 9:27 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 6/13/2013 9:15 PM, Maxim Khitrov wrote: >> >> This works and also triggers SQLITE_SCHEMA with v1 interface. I did a >> few more tests and it looks like the schema changes are

Re: [sqlite] Prepared statement invariants

2013-06-13 Thread Maxim Khitrov
On Thu, Jun 13, 2013 at 8:36 PM, Igor Tandetnik wrote: > On 6/13/2013 8:29 PM, Igor Tandetnik wrote: >> >> The column addition should have failed, unless you are using WAL in >> which case changes made by the writer are not visible to outstanding >> readers. A useful test

[sqlite] Prepared statement invariants

2013-06-13 Thread Maxim Khitrov
Hello, I'd like to check my assumptions. After preparing a statement using the v2 interface, which functions are guaranteed to return the same values for that statement instance? These are the ones that I'm interested in at the moment: sqlite3_bind_parameter_count sqlite3_bind_parameter_name