diff options
author | drh <> | 2024-02-28 01:12:21 +0000 |
---|---|---|
committer | drh <> | 2024-02-28 01:12:21 +0000 |
commit | 8597eee1196c263be80f9d03639360b40fe17307 (patch) | |
tree | 1d42f1731b022127412a3d61690316b949614597 /src/expr.c | |
parent | b542933cba507c9660dd41df6e73866cc4c7d601 (diff) | |
download | sqlite-8597eee1196c263be80f9d03639360b40fe17307.tar.gz sqlite-8597eee1196c263be80f9d03639360b40fe17307.zip |
Always convert 32-bit integer literals into EP_IntValue notation, even if
they contain "_" separators.
FossilOrigin-Name: 2dfc427f676255cbe189a26bfec2405d41d31ccc4512c55b31e6e633261d7a23
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/expr.c b/src/expr.c index f9b280bbc..e2cc15cfd 100644 --- a/src/expr.c +++ b/src/expr.c @@ -914,11 +914,12 @@ void sqlite3ExprSetErrorOffset(Expr *pExpr, int iOfst){ ** appear to be quoted. If the quotes were of the form "..." (double-quotes) ** then the EP_DblQuoted flag is set on the expression node. ** -** Special case: If op==TK_INTEGER and pToken points to a string that -** can be translated into a 32-bit integer, then the token is not -** stored in u.zToken. Instead, the integer values is written -** into u.iValue and the EP_IntValue flag is set. No extra storage +** Special case (tag-20240227-a): If op==TK_INTEGER and pToken points to +** a string that can be translated into a 32-bit integer, then the token is +** not stored in u.zToken. Instead, the integer values is written +** into u.iValue and the EP_IntValue flag is set. No extra storage ** is allocated to hold the integer text and the dequote flag is ignored. +** See also tag-20240227-b. */ Expr *sqlite3ExprAlloc( sqlite3 *db, /* Handle for sqlite3DbMallocRawNN() */ @@ -934,7 +935,7 @@ Expr *sqlite3ExprAlloc( if( pToken ){ if( op!=TK_INTEGER || pToken->z==0 || sqlite3GetInt32(pToken->z, &iValue)==0 ){ - nExtra = pToken->n+1; + nExtra = pToken->n+1; /* tag-20240227-a */ assert( iValue>=0 ); } } |