1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Faster implementation of sqlite3IsBinary().

FossilOrigin-Name: be05d0db09f43cc3362c28273463d1d236af737a4f8a494cf1050da07ed0df47
This commit is contained in:
drh
2018-07-27 18:12:40 +00:00
parent 7810ab6464
commit bcd15938ae
4 changed files with 18 additions and 17 deletions

View File

@@ -910,6 +910,15 @@ static int binCollFunc(
return rc;
}
/*
** 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.
**