Hello,
I have to use sqlite 3.2.1 with an application (newer version of thread
usage is not supported in the code). I would like to use it on an ubuntu
6.06 server distribution of linux.
I must enable threads usage, so I added the --enable-threads to the
configure script.
This script gives a warning, and I think this warning can be the cause
of my problem.
Here is its content :
checking for building with threads... yes (default)
configure: WARNING:
--enable-threads requested, but building against a Tcl that is NOT
thread-enabled. This is an OK configuration that will also run in
a thread-enabled core.
Before running this configure script, I added tcl to my distribution
(sudo apt-get install tcl8.0).
To avoid this warning I tried to add the tclthread package for ubuntu,
but it changes nothing.
The end of the configuration is OK and the compilation works fine, but
when I access to the database via the api, I always have an error.
Here is my code :
int _sqlutil_exec(char * SQL) {
char * err;
int rc;
pthread_mutex_lock(&sql_mutex);
rc = my_sqlite3_exec(NMdatabase, SQL, NULL, NULL, &err);
pthread_mutex_unlock(&sql_mutex);
if (rc != SQLITE_OK) {
debug_msg( NM_DEBUG_ERROR, "ERROR - sqlutil_exec \n %s\n %s", err,
SQL);
return -1;
}
return 0;
};
And here is my error message :
13-Jul-06 13:57:30: ERROR - sqlutil_exec
library routine called out of sequence
UPDATE servers SET state = -1 WHERE id="uuid:00:0C:76:7A:B8:3E";
The result code is 134810728, but it increases for subsequent requests.
I don't think this is a hint, but we never know...
If you already have this problem or if you can help me, I would really
appreciate.
Thanks,
yohann