diff options
author | drh <drh@noemail.net> | 2018-07-27 18:12:40 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-07-27 18:12:40 +0000 |
commit | bcd15938ae67554be43ba93c076bd2430cb62479 (patch) | |
tree | 71dac71ac25c98ef883925c322870d9823137fe8 /src/main.c | |
parent | 7810ab646453c143966dad28f51e1a1950c89f88 (diff) | |
download | sqlite-bcd15938ae67554be43ba93c076bd2430cb62479.tar.gz sqlite-bcd15938ae67554be43ba93c076bd2430cb62479.zip |
Faster implementation of sqlite3IsBinary().
FossilOrigin-Name: be05d0db09f43cc3362c28273463d1d236af737a4f8a494cf1050da07ed0df47
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 07f668881..4ae5c7ecd 100644 --- a/src/main.c +++ b/src/main.c @@ -911,6 +911,15 @@ static int binCollFunc( } /* +** Return true if CollSeq is the default built-in BINARY. +*/ +int sqlite3IsBinary(const CollSeq *p){ + assert( p==0 || p->xCmp!=binCollFunc || p->pUser!=0 + || strcmp(p->zName,"BINARY")==0 ); + return p==0 || (p->xCmp==binCollFunc && p->pUser==0); +} + +/* ** Another built-in collating sequence: NOCASE. ** ** This collating sequence is intended to be used for "case independent |