[sqlite] Logically dead code in function sqlite3_index_info

2015-08-15 Thread Carlos Tangerino
Hi.
This is a logically dead code because TERM_VNULL is 0.
The 'continue' *(1)* will never be executed.

testcase( pTerm->eOperator & WO_ISNULL );
testcase( pTerm->eOperator & WO_ALL );
if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
if( pTerm->wtFlags & *TERM_VNULL* ) continue;
*-(1)*
pIdxCons[j].iColumn = pTerm->u.leftColumn;
pIdxCons[j].iTermOffset = i;

Best regards.
Carlos Tangerino


[sqlite] Logically dead code in function sqlite3_index_info

2015-08-15 Thread Richard Hipp
On 8/15/15, Carlos Tangerino  wrote:
> Hi.
> This is a logically dead code because TERM_VNULL is 0.

VNULL can be 0 or 0x80, depending on your compile-time configuration.

> The 'continue' *(1)* will never be executed.
>
> testcase( pTerm->eOperator & WO_ISNULL );
> testcase( pTerm->eOperator & WO_ALL );
> if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
> if( pTerm->wtFlags & *TERM_VNULL* ) continue;
> *-(1)*
> pIdxCons[j].iColumn = pTerm->u.leftColumn;
> pIdxCons[j].iTermOffset = i;
>
> Best regards.
> Carlos Tangerino
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org