1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Fix compilation with both OMIT_UTF16 and ENABLE_STAT2 defined. Ticket [56928bd084ea530eb8a0b3ebe5d2d9033fb1de7f|56928bd084].

FossilOrigin-Name: cd850d49a12a2852258cbd7d5db56715132dff17
This commit is contained in:
dan
2009-09-21 16:34:24 +00:00
parent 75cbd984f7
commit e83c4f3a9e
4 changed files with 52 additions and 47 deletions

View File

@@ -1956,9 +1956,8 @@ static int whereRangeRegion(
int eSampletype = aSample[i].eType;
if( eSampletype==SQLITE_NULL || eSampletype<eType ) continue;
if( (eSampletype!=eType) ) break;
if( pColl->enc==SQLITE_UTF8 ){
r = pColl->xCmp(pColl->pUser, aSample[i].nByte, aSample[i].u.z, n, z);
}else{
#ifndef SQLITE_OMIT_UTF16
if( pColl->enc!=SQLITE_UTF8 ){
int nSample;
char *zSample = sqlite3Utf8to16(
db, pColl->enc, aSample[i].u.z, aSample[i].nByte, &nSample
@@ -1969,6 +1968,10 @@ static int whereRangeRegion(
}
r = pColl->xCmp(pColl->pUser, nSample, zSample, n, z);
sqlite3DbFree(db, zSample);
}else
#endif
{
r = pColl->xCmp(pColl->pUser, aSample[i].nByte, aSample[i].u.z, n, z);
}
if( r>0 ) break;
}