Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Dan Kennedy
On 01/25/2011 12:20 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 01/24/2011 06:05 PM, Roger Binns wrote: >> I'm finding custom VFS code is no longer working at all. > > The cause is a new xFileControl operation SQLITE_FCNTL_SYNC which appears to > needlessly

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/24/2011 06:05 PM, Roger Binns wrote: > I'm finding custom VFS code is no longer working at all. The cause is a new xFileControl operation SQLITE_FCNTL_SYNC which appears to needlessly duplicate the existing xSync method. Additionally unlike

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Dan Kennedy
On 01/25/2011 04:10 AM, Black, Michael (IS) wrote: > Is this if statement meant to be constant? Or should it be comparing the > requested encoding instead of SQLITE_UTF16NATIVE? > > SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nChar){ >int c; >unsigned char const *z = zIn;

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/24/2011 10:12 AM, Richard Hipp wrote: > Unless serious problems I'm finding custom VFS code is no longer working at all. Mine "inherits" from an existing one overriding or calling the original methods as appropriate. My code for this is

Re: [sqlite] :Re: SQLite version 3.7.5 - code freeze

2011-01-24 Thread Richard Hipp
On Mon, Jan 24, 2011 at 5:23 PM, Black, Michael (IS) wrote: > I plugged 3.7.5 code freeze into my app and fairly quickly hit a potential > bug. > > I'm using a separate thread to commit my transactions and > SQLITE_THREADSAFE=2 > > I never saw a problem in my testing so

[sqlite] :Re: SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
I plugged 3.7.5 code freeze into my app and fairly quickly hit a potential bug. I'm using a separate thread to commit my transactions and SQLITE_THREADSAFE=2 I never saw a problem in my testing so far with 3.7.3 -- but a few runs after putting 3.7.5 in I started getting an insert error followed

Re: [sqlite] EXTERNAL:Re: SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
Oops...sorry...I copied it from 3.7.3 The line in 3.7.5 is at 55937: SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, int addr, int val){ assert( p!=0 ); assert( addr>=0 ); if( p->nOp>addr ){ <<< Warning occurs here p->aOp[addr].p2 = val; } } A newer gcc with -O2 or

Re: [sqlite] cast(count(1) as integer) result is text?

2011-01-24 Thread Vannus
Ok, i think i've found my/sqlite problem sqlite_column_decltype and sqlite_column_type are both returning null, so zeos (and presumably sql express) don't know which type to request from http://www.sqlite.org/c3ref/column_decltype.html "If this

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Richard Hipp
On Mon, Jan 24, 2011 at 3:36 PM, Black, Michael (IS) wrote: > Minor item...I reported this before... > Compiling version 3.7.5...this warning has actually been around a while > though > I can't find anybody reporting it for sqlite3... > > gcc44 -O3 -Wall -fPIC

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
Around line 59981 sqlite3StrAccumAppend(, zStart, zRawSql-zStart); The zRawSql-zStart is a 64-bit value (on a 64-bit machine) but gets down-converted to int. Seems a little more error checking is appropriate to ensure this doesn't exceed an int. Would be an awfully long SQL string but

Re: [sqlite] EXTERNAL:Re: SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
I know some of these may seem minor but for those of us who turn on all warnings disabling them or explicitly allowing for them would prevent some of us from having to waste our time looking at them. Around line 59981 an explicit cast to u16 would prevent a loss-of-precision warning. And

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nChar){ int c; should be unsigned int c; Otherwise I don't think the macros work right (they become constant expression warnings). Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
Is this if statement meant to be constant? Or should it be comparing the requested encoding instead of SQLITE_UTF16NATIVE? SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nChar){ int c; unsigned char const *z = zIn; int n = 0; if( SQLITE_UTF16NATIVE==SQLITE_UTF16BE ){

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Black, Michael (IS)
Minor item...I reported this before... Compiling version 3.7.5...this warning has actually been around a while though I can't find anybody reporting it for sqlite3... gcc44 -O3 -Wall -fPIC -DNO_GETTOD -c sqlite3.c sqlite3.c: In function âfkLookupParentâ: sqlite3.c:55430: warning: assuming

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Marian Cascaval
Here's a first documentation typo: http://www.sqlite.org/draft/c3ref/mprintf.html "_In_ sqlite3_snprintf() routine is similar to "snprintf()" from the standard C library." It should be "_The_ sqlite3_snprintf() routine is similar to ...". Marian Cascaval

[sqlite] Feature request: chains of stemmers for FTS

2011-01-24 Thread Alexey Pechnikov
Hello! PostgreSQL/sphinx/etc. can use a chains of stemmers and this is the great feature. As example, english snowball stemmer + russian snowball stemmer. This is very important for production usage of the FTS module. In SQLite we can use snowball and other stemmers but only single stemmer on FTS

[sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Richard Hipp
The current plan is to release SQLite version 3.7.5 on Wednesday of next week 2011-02-02. Please see draft release notes here: http://www.sqlite.org/draft/releaselog/3_7_5.html You can download a snapshot of the latest SQLite amalgamation from here:

Re: [sqlite] REGEXP parameter order - embarassed newbie

2011-01-24 Thread Teg
Hello James630165, I guess it depends on how good a programmer you are. I just used the web site and some reference books on SQL. Wrote my own wrapper and improve it as time goes on and I need new features. C Sunday, January 23, 2011, 8:05:08 PM, you wrote: Jac> JCC/DRH Jac> Jac> If a person

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Duquette, William H (318K)
On 1/24/11 8:36 AM, "Simon Slavin" wrote: > > On 24 Jan 2011, at 4:21pm, Duquette, William H (318K) wrote: > >> A question on using randomblob(16) to generate UUIDs, as the SQLite docs >> suggest: what assurance do you have that the UUID really is universally >> unique?

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Duquette, William H (318K)
On 1/24/11 8:29 AM, "Richard Hipp" wrote: > On Mon, Jan 24, 2011 at 11:21 AM, Duquette, William H (318K) < > william.h.duque...@jpl.nasa.gov> wrote: > >> A question on using randomblob(16) to generate UUIDs, as the SQLite docs >> suggest: what assurance do you have that the

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Simon Slavin
On 24 Jan 2011, at 4:21pm, Duquette, William H (318K) wrote: > A question on using randomblob(16) to generate UUIDs, as the SQLite docs > suggest: what assurance do you have that the UUID really is universally > unique? It's a pseudo-random number, and you can replicate a stream of >

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Richard Hipp
On Mon, Jan 24, 2011 at 11:21 AM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > A question on using randomblob(16) to generate UUIDs, as the SQLite docs > suggest: what assurance do you have that the UUID really is universally > unique? It's a pseudo-random number, and

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Duquette, William H (318K)
A question on using randomblob(16) to generate UUIDs, as the SQLite docs suggest: what assurance do you have that the UUID really is universally unique? It's a pseudo-random number, and you can replicate a stream of pseudo-random numbers by setting the seed appropriately. Is randomblob()

Re: [sqlite] REGEXP parameter order - embarassed newbie

2011-01-24 Thread Duquette, William H (318K)
Being one who speaks good English, has a logical mind, and has previously programmed in C, AND who had used SQLite for around five years on the strength of that, I still found the book useful when I read it a couple of months ago. I already knew the basics, but it shed light on a few obscure

Re: [sqlite] Deferred foreign key constraint bug?

2011-01-24 Thread Steve Campbell
That makes sense. Thanks for explaining. Steve -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: Monday, January 24, 2011 9:57 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Deferred

Re: [sqlite] Deferred foreign key constraint bug?

2011-01-24 Thread Richard Hipp
On Fri, Jan 21, 2011 at 1:38 PM, Steve Campbell wrote: > > To summarize, we can prevent foreign keys from being properly enforced if > we declare the constraints to be deferred and we leave lingering statement > handles open. > > Is this a bug? > > We cannot check FK

Re: [sqlite] Deferred foreign key constraint bug?

2011-01-24 Thread Steve Campbell
Yes, that's right. Deferrable is all about transactions. A lone-statement that is not explicitly enclosed in a BEGIN-COMMIT block is itself an implicit transaction. Deferred foreign key constraints get enforced at the COMMIT and the COMMIT is implicitly executed with a lone-statement, so the

Re: [sqlite] REGEXP parameter order

2011-01-24 Thread Jean-Christophe Deschamps
Hi Igor, >I'm not quite sure what you are talking about, but see the >documentation of like() and glob() functions here: You're right about LIKE and GLOB. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] REGEXP parameter order

2011-01-24 Thread Igor Tandetnik
Jean-Christophe Deschamps wrote: > Digging further I found mention of this only in the VTAB description, > but may be a mention or link to the infix argument reversal should > appear in the LIKE, GLOB, REGEXP, MATCH description, as implementing > simple extension functions doesn't

Re: [sqlite] regex -- no clue

2011-01-24 Thread Igor Tandetnik
Gert Van Assche wrote: > I read in the documentation "The REGEXP operator is a special syntax for > the regexp() user function. No regexp() user function is defined by default > and so use of the REGEXP operator will normally result in an error message. > If a

Re: [sqlite] CREATE TEMP TRIGGER

2011-01-24 Thread Igor Tandetnik
Marco Bambini wrote: > Where I can find more information about TEMP TRIGGERs? Temp triggers only fire on the connection on which they are created, and are automatically dropped when this connection is closed. Apart from that, they work like regular triggers. -- Igor

Re: [sqlite] REGEXP parameter order - embarassed newbie

2011-01-24 Thread James630165
JCC/DRH If a person speaks good English and has a logical mind, has previously programmed in C ... why is there a need to buy "The definitive guide to programming SQLite"? I understand that "Everyone does". Jim. ___ sqlite-users mailing list

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Alexey Pechnikov
See http://sqlite.mobigroup.ru/dir?name=ext/uuid 2011/1/24 sqlite-us...@h-rd.org > Hi, > > I have put together a simple uuid generation method in sqlite: > > select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) > || '-' || '4' || substr( hex(

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Andy Gibbs
On Monday, January 24, 2011 11:11 AM, Artur Reilin wrote: >> Hi, >> >> I have put together a simple uuid generation method in sqlite: >> >> select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) >> || '-' || '4' || substr( hex( randomblob(2)), 2) || '-' >> ||

Re: [sqlite] REGEXP parameter order

2011-01-24 Thread Jean-Christophe Deschamps
> > Sorry for elementary questions but when implementing a REGEXP function > > (I'm using PCRE from pcre.org) I need to know in which order the two > > arguments (target, pattern) will be passed to the function. > > > > I also would like to retain the last pattern used in compiled form > >

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Artur Reilin
> Hi, > > I have put together a simple uuid generation method in sqlite: > > select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) > || '-' || '4' || substr( hex( randomblob(2)), 2) || '-' > || substr('AB89', 1 + (abs(random()) % 4) , 1) || >

[sqlite] CREATE TEMP TRIGGER

2011-01-24 Thread Marco Bambini
Where I can find more information about TEMP TRIGGERs? In the official page: http://www.sqlite.org/lang_createtrigger.html there is no mention about the TEMP clause. Thanks. -- Marco Bambini http://www.sqlabs.com ___ sqlite-users mailing list

[sqlite] uuid generation in sqlite

2011-01-24 Thread sqlite-us...@h-rd.org
Hi, I have put together a simple uuid generation method in sqlite: select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || '4' || substr( hex( randomblob(2)), 2) || '-' || substr('AB89', 1 + (abs(random()) % 4) , 1) ||

[sqlite] regex -- no clue

2011-01-24 Thread Gert Van Assche
Hi all, I read in the documentation "The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message. If a application-defined SQL