mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Small performance optimization in the allowedOp() routine of the WHERE
clause analysis code. FossilOrigin-Name: 4ba8be544711e07748e8dd3ca6b81f9897906061c0a1a1bb4fb3808dc27f734b
This commit is contained in:
@ -101,7 +101,12 @@ static int allowedOp(int op){
|
||||
assert( TK_LT>TK_EQ && TK_LT<TK_GE );
|
||||
assert( TK_LE>TK_EQ && TK_LE<TK_GE );
|
||||
assert( TK_GE==TK_EQ+4 );
|
||||
return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL || op==TK_IS;
|
||||
assert( TK_IN<TK_EQ );
|
||||
assert( TK_IS<TK_EQ );
|
||||
assert( TK_ISNULL<TK_EQ );
|
||||
if( op>TK_GE ) return 0;
|
||||
if( op>=TK_EQ ) return 1;
|
||||
return op==TK_IN || op==TK_ISNULL || op==TK_IS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user