1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Fix minor problems in the new sqlite3ExprDataType() function.

FossilOrigin-Name: c1d5261b222bbf94c20e558089f3d2eae6a88b6d739225ee4f7d0338e0e59994
This commit is contained in:
drh
2022-12-14 23:53:29 +00:00
parent 70ac36e877
commit da69802e92
4 changed files with 23 additions and 16 deletions

View File

@@ -109,7 +109,8 @@ int sqlite3ExprDataType(const Expr *pExpr){
break;
}
case TK_NULL: {
return 0x00;
pExpr = 0;
break;
}
case TK_STRING: {
return 0x02;
@@ -145,6 +146,9 @@ int sqlite3ExprDataType(const Expr *pExpr){
for(ii=1; ii<pList->nExpr; ii+=2){
res |= sqlite3ExprDataType(pList->a[ii].pExpr);
}
if( pList->nExpr % 2 ){
res |= sqlite3ExprDataType(pList->a[pList->nExpr-1].pExpr);
}
return res;
}
default: {
@@ -152,7 +156,7 @@ int sqlite3ExprDataType(const Expr *pExpr){
}
} /* End of switch(op) */
} /* End of while(pExpr) */
return 0;
return 0x00;
}
/*