Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Xingwei Lin
Thanks all the nice guys' reply!! On Thu, Jan 9, 2020 at 10:59 PM Gary R. Schmidt wrote: > On 09/01/2020 17:47, Xingwei Lin wrote: > > Hi, > > > > How can I pass -Dxxx compile option when I build sqlite? Such as, - > > DSQLITE_ENABLE_INTERNAL_FUNCTIONS. > > > ./configure --help will tell you tha

Re: [sqlite] Assertion `memIsValid(pCtx->argv[i])' failed.

2020-01-09 Thread Yongheng Chen
The error pic got stripped. It was "Database error: SQL logic error: {DELETE FROM ftsidx WHERE docid IN (SELECT rowid FROM ftsdocs WHERE type='t' AND rid=0 AND idxed)}” > On Jan 9, 2020, at 7:17 PM, Yongheng Chen wrote: > > Hi, > > We found an assertion failed in sqlite. Here’s the POC: > —

[sqlite] Assertion `memIsValid(pCtx->argv[i])' failed.

2020-01-09 Thread Yongheng Chen
Hi, We found an assertion failed in sqlite. Here’s the POC: — CREATE TABLE v0 ( v1 INT CHECK( datetime ( ( NULL ) ,( '1995-09-01' ) ,( 'GERMANY' ) ,( 'MED P' ) ,( 'abc' ) ,( 'Y' ) ,( '13' ) ,( 'MED BAG' ) ,( '199419' ) ,( 'LG CASE' ) ,( '1995-09-01' ) ,( 'SM BOX' ) ,( '' ) ,( 'a' )

[sqlite] Bad Declaration in fossildelta.c

2020-01-09 Thread Keith Medcalf
static const enc = SQLITE_UTF8|SQLITE_INNOCUOUS; should that be static const int enc = SQLITE_UTF8|SQLITE_INNOCUOUS; gcc (MinGW) 8.1 complains but assumes that was what was meant... -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Stephan Buchert
I have an executable file myconfigure with ./configure CFLAGS="-O2 -DSQLITE_MAX_COLUMN=4096 -DHAVE_FDATASYNC -DHAVE_STRCHRNUL -DHAVE_LOCALTIME_R -DHAVE_GMTIME_R -DHAVE_NAN -DHAVE_USLEEP -DSQLITE_DEFAULT_WORKER_THREADS=4 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI -DSQLITE_ENABLE_API_ARMOR -DSQLITE_ENAB

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Gary R. Schmidt
On 09/01/2020 17:47, Xingwei Lin wrote: Hi, How can I pass -Dxxx compile option when I build sqlite? Such as, - DSQLITE_ENABLE_INTERNAL_FUNCTIONS. ./configure --help will tell you that CFLAGS is how you do that, so: ./configure CFLAGS=-Dwhatever If you have many options: ./configure

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Warren Young
On Jan 9, 2020, at 6:51 AM, Warren Young wrote: > >./configure CFLAGS='-DSQLITE_ENABLE_INTERNAL_FUNCTIONS' > > The reasons for the recommendation have to do with complications that result > from multiple variables, nested Makefile.am, etc. It also allows autoreconf to work properly in the

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Warren Young
On Jan 9, 2020, at 6:37 AM, Richard Hipp wrote: > > On 1/9/20, Xingwei Lin wrote: >> >> How can I pass -Dxxx compile option when I build sqlite? Such as, - >> DSQLITE_ENABLE_INTERNAL_FUNCTIONS. > > Option 1: > > CFLAGS='-O2 -DSQLITE_ENABLE_INTERNAL_FUNCTIONS' ./configure && make > > Option 2

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Richard Hipp
On 1/9/20, Xingwei Lin wrote: > Hi, > > How can I pass -Dxxx compile option when I build sqlite? Such as, - > DSQLITE_ENABLE_INTERNAL_FUNCTIONS. > Option 1: CFLAGS='-O2 -DSQLITE_ENABLE_INTERNAL_FUNCTIONS' ./configure && make Option 2: ./configure && OPTS='-DSQLITE_ENABLE_INTERNAL_FUNCTIONS' ma

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Kees Nuyt
On Thu, 9 Jan 2020 14:47:44 +0800, you wrote: > Hi, > > How can I pass -Dxxx compile option when I build sqlite? Such as, - > DSQLITE_ENABLE_INTERNAL_FUNCTIONS. I don't consider myself an expoert, but the script below works for me on a Raspberry Pi, Raspbian Jessie. Note: instead of readline I us

Re: [sqlite] NOTNULL

2020-01-09 Thread Luuk
On 8-1-2020 12:15, R Smith wrote: I find the keyword NOTNULL listed among known SQLite keywords - no. 88 on this page: https://sqlite.org/lang_keywords.html But cannot find a single mention of it or place to use it in SQLite, nor get any hit on the sqlite.org search except in reference to the

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Niall O'Reilly
On 9 Jan 2020, at 9:41, Xingwei Lin wrote: > I always use ./configure && make to compile sqlite. > > ./configure can add some compile options, but I don't know how to add -Dxxx > option in this compilation process. I don't know (since I've never needed to build SQLite), but can offer a hint which

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Xingwei Lin
Thanks for reply. I always use ./configure && make to compile sqlite. ./configure can add some compile options, but I don't know how to add -Dxxx option in this compilation process. On Thu, Jan 9, 2020 at 5:29 PM Simon Slavin wrote: > On 9 Jan 2020, at 6:47am, Xingwei Lin wrote: > > > How can

Re: [sqlite] how to pass -Dxxx compile option

2020-01-09 Thread Simon Slavin
On 9 Jan 2020, at 6:47am, Xingwei Lin wrote: > How can I pass -Dxxx compile option when I build sqlite? Such as, - > DSQLITE_ENABLE_INTERNAL_FUNCTIONS. Depends on which compiler you're using. See examples for gcc on this page: