Re: [sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Ratheendran R
Thanks Olivier Mascia for the tips and suggestion I will definitely try out. sorry for the code with the double pointer which has raised lot of confusion I ensured this fault raised is not beacuse of any of my pointer usage . I am having a workaround with key/value memory allocation in heap and

Re: [sqlite] Regarding CoC

2018-10-21 Thread Rowan Worth
On Fri, 19 Oct 2018 at 19:52, Mantas Gridinas wrote: > I found code of conduct in documentation and I was wondering if it were > true. Checking the version history it appears to have been added on > 2018-02-22. > > 23. Do not nurse a grudge. ::sigh:: DROP TABLE grudges; I was amassing such a

Re: [sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Keith Medcalf
You have a vast number of undeclared variables that are pointing into super-crash-land: sqlite3 *mod_init() db is undeclared dbObj is undeclared lastError is undeclared query is undeclared zErrMsg is undeclared int mydef_set(cf_db_t *dbObj,char *key, char **value) type cf_db_t

Re: [sqlite] 64-column covering index limit clarification

2018-10-21 Thread Dan Kennedy
On 10/19/2018 02:30 AM, Deon Brewis wrote: Hi, I seem to have run into a limit where SQLITE doesn't use an index correctly if an indexed column is over the 64th column in the table. It's a partial index like: CREATE INDEX idx ON table(A, B DESC, C, D) WHERE A > 0 Where A and B are

Re: [sqlite] geopoly data input options

2018-10-21 Thread Noel Frankinet
Spatialite does to Sqlite what Postgis does to Postgres. Same concepts. Noël On Sat, 20 Oct 2018 at 22:49, Jonathan Moules wrote: > More specifically, in the "Simple Features for SQL" specification: > > http://www.opengeospatial.org/standards/sfs > > and if you have access (or gobs of money),

Re: [sqlite] SQLITE_OPEN_READONLY in PHP

2018-10-21 Thread p...@geniais.com
Thanks to Simon Slavin and Tim Streater All replies works fine. Thank you very much Ismael ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Larry Brasfield
The code you provided declares and defines a pointer, named ‘db’ in main(), which is used with the SQLite API but never made to point to a valid object in memory or even to allocated memory. Hence your segmentation fault. ___ sqlite-users mailing

[sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Ratheendran R
Hi, I am a embedded engineer and new to sqlite,we want to use sqlite for our local storage instead of file i/o. I have created a table with key and value records of char type,now if I try store a value with string length more than 50 char I get segmentation fault,please see the code below and

Re: [sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Olivier Mascia
Hi, mydef_set probably overflows your 'query' variable of which you don't show declaration but I guess it is 200 bytes seeing your memset(query,0,200); strcpy(query, ... This above and why this char** buffer in mydef_set prototype? Think about what your intent was. Compare to what you did

Re: [sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Peter da Silva
You're passing a char * to a routine that expects a char **, and then immediately trying to indirect through it, which means it's taking the text, treating it as a pointer, and passing the random data it's pointing to as a string to sqlite. On Sun., 21 Oct. 2018, 11:55 Ratheendran R, wrote: >