diff options
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index f3589bb0a..28b417c9a 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -1241,8 +1241,9 @@ static void whereIndexExprTrans( #ifndef SQLITE_OMIT_GENERATED_COLUMNS }else if( iRef>=0 && (pTab->aCol[iRef].colFlags & COLFLAG_VIRTUAL)!=0 - && (pTab->aCol[iRef].zCnColl==0 - || sqlite3StrICmp(pTab->aCol[iRef].zCnColl, sqlite3StrBINARY)==0) + && ((pTab->aCol[iRef].colFlags & COLFLAG_HASCOLL)==0 + || sqlite3StrICmp(sqlite3ColumnColl(&pTab->aCol[iRef]), + sqlite3StrBINARY)==0) ){ /* Check to see if there are direct references to generated columns ** that are contained in the index. Pulling the generated column |