Add const to parameters on various internal interfaces.
FossilOrigin-Name: 70c221c5cf7b4d9ed34f16d045f262f99d16aa3db84f80cf0b03ee82ba28d075
This commit is contained in:
parent
84d90319e5
commit
1580d50b76
18
manifest
18
manifest
@ -1,5 +1,5 @@
|
||||
C Dbsqlfuzz\s(a097eaad43c3c845b236126df92fb49b25449b0c)\sfound\sa\sway\sto\sreach\sthe\nassert()\sthat\swas\sadded\sto\ssqlite3_declare_vtab()\sby\s[eb94f4a8174436b1].\nThis\scheck-in\sfixes\sthe\sproblem.
|
||||
D 2021-09-24T19:57:32.264
|
||||
C Add\sconst\sto\sparameters\son\svarious\sinternal\sinterfaces.
|
||||
D 2021-09-25T17:07:57.340
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -499,7 +499,7 @@ F src/date.c e0632f335952b32401482d099321bbf12716b29d6e72836b53ae49683ebae4bf
|
||||
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
|
||||
F src/dbstat.c 3aa79fc3aed7ce906e4ea6c10e85d657299e304f6049861fe300053ac57de36c
|
||||
F src/delete.c 3ce6af6b64c8b476de51ccc32da0cb3142d42e65754e1d8118addf65b8bcba15
|
||||
F src/expr.c 5316aff6218b871550e1a84c76f3343dabd0f1096ec29ad26f14e85c2ccd701e
|
||||
F src/expr.c 38597afb008db2e0a5f86a82827567acb98f502cab61663ef16bc688bc256803
|
||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c 1905af1821b88321e1bb9d6a69e704495b6844a9b6c29398d40117cc251e893c
|
||||
F src/func.c 812ac5383067bed7150d8597e83c47b714d73db0e62af55811d1a145243e58e1
|
||||
@ -552,7 +552,7 @@ F src/shell.c.in 9df263dc0949698a8728ecc5bb826666ca8ced75201d5440a161b629455cd46
|
||||
F src/sqlite.h.in 4e977a5e2ed1a9e8987ff65a2cab5f99a4298ebf040ea5ff636e1753339ff45a
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h e97f4e9b509408fea4c4e9bef5a41608dfac343b4d3c7a990dedde1e19af9510
|
||||
F src/sqliteInt.h 8e88176d15baa0d36b6401042c8b301e9ad28fb34e43a29c0c44001e5a325e94
|
||||
F src/sqliteInt.h 06a8f97a644388b28c0a9428a6b2cdf40e8b51b1cf38064f41baba5fd810be49
|
||||
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
|
||||
F src/status.c 4b8bc2a6905163a38b739854a35b826c737333fab5b1f8e03fa7eb9a4799c4c1
|
||||
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
|
||||
@ -625,7 +625,7 @@ F src/vdbeInt.h 38206c8dd6b60ff03d9fd4f626b1b4fd0eef7cdc44f2fc2c1973b0f932a3f26b
|
||||
F src/vdbeapi.c aa5aaf2c37676b83af5724c6cd8207a3064ed46a217fd180957f75ac84f7a2a5
|
||||
F src/vdbeaux.c 2368a8888f17368d4040a05966f7d2a2276cac4eeeba50793828186d999e3c8f
|
||||
F src/vdbeblob.c 60a7694760e35b2bba166cf49eb6a1eb0b31581102b49de78008ca3032406065
|
||||
F src/vdbemem.c 53881aa0a7845922a075b3f375695588618098871a7a4120af4c297b80fa3e64
|
||||
F src/vdbemem.c 0e830c2aab24241eed85bd4c8a5bd8c9b959081316477440bfffb35089ba7d0b
|
||||
F src/vdbesort.c cd5130f683706c1a43e165a74187745fb3351cb56052cf9dc91de820634bbde2
|
||||
F src/vdbetrace.c 666c6fd9f1b62be6999e072a45b913e3c2c3518bc60dfd4d54fe304130acb724
|
||||
F src/vdbevtab.c f99b275366c5fc5e2d99f734729880994ab9500bdafde7fae3b02d562b9d323c
|
||||
@ -638,7 +638,7 @@ F src/where.c da3981a12e9eb5a71d32bab60ac1957fd4aa337aaea07ca8019b01f8788f442a
|
||||
F src/whereInt.h 9248161dd004f625ce5d3841ca9b99fed3fc8d61522cf76340fc5217dbe1375b
|
||||
F src/wherecode.c 0208553a0602146b5640747c0e3f7a8c785108c2d06a160b69f23491e9dc781e
|
||||
F src/whereexpr.c e5fdac355deef93a821f03b90770f92f2be833e92bbdeff8ac1b6c2ae1f74356
|
||||
F src/window.c a5417de85a13e1f47bfb33c0bae5ae0ded5d68b146f4986c3d89d10a04f2c262
|
||||
F src/window.c f27e34e896f84e0bedec32b027d4531f224971ce3e16f8e1d97a968875ddcec1
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/affinity2.test ce1aafc86e110685b324e9a763eab4f2a73f737842ec3b687bd965867de90627
|
||||
F test/affinity3.test eecb0dabee4b7765a8465439d5e99429279ffba23ca74a7eae270a452799f9e7
|
||||
@ -1926,7 +1926,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P a3c71a673ddd1c299bdae550fb955077b77088329a8ca2895dfb23538b524a8e
|
||||
R 18e1aa2d4fa26b1304d3b0868495907e
|
||||
P 857d26a68cf439e9cba4f8a3b326c69366fc486a876b76835538709ee39b8713
|
||||
R c04d6e91d6992a17a9e5f2b79f3ffd3e
|
||||
U drh
|
||||
Z c6e51dd68933de6b823f0292e322691d
|
||||
Z f7f3c0d8bcac3b88e76c7be60e7a4c19
|
||||
|
@ -1 +1 @@
|
||||
857d26a68cf439e9cba4f8a3b326c69366fc486a876b76835538709ee39b8713
|
||||
70c221c5cf7b4d9ed34f16d045f262f99d16aa3db84f80cf0b03ee82ba28d075
|
30
src/expr.c
30
src/expr.c
@ -5329,7 +5329,11 @@ void sqlite3ExprIfFalseDup(Parse *pParse, Expr *pExpr, int dest,int jumpIfNull){
|
||||
** Otherwise, if the values are not the same or if pExpr is not a simple
|
||||
** SQL value, zero is returned.
|
||||
*/
|
||||
static int exprCompareVariable(Parse *pParse, Expr *pVar, Expr *pExpr){
|
||||
static int exprCompareVariable(
|
||||
const Parse *pParse,
|
||||
const Expr *pVar,
|
||||
const Expr *pExpr
|
||||
){
|
||||
int res = 0;
|
||||
int iVar;
|
||||
sqlite3_value *pL, *pR = 0;
|
||||
@ -5381,7 +5385,12 @@ static int exprCompareVariable(Parse *pParse, Expr *pVar, Expr *pExpr){
|
||||
** Argument pParse should normally be NULL. If it is not NULL and pA or
|
||||
** pB causes a return value of 2.
|
||||
*/
|
||||
int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
|
||||
int sqlite3ExprCompare(
|
||||
const Parse *pParse,
|
||||
const Expr *pA,
|
||||
const Expr *pB,
|
||||
int iTab
|
||||
){
|
||||
u32 combinedFlags;
|
||||
if( pA==0 || pB==0 ){
|
||||
return pB==pA ? 0 : 2;
|
||||
@ -5465,7 +5474,7 @@ int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
|
||||
** Two NULL pointers are considered to be the same. But a NULL pointer
|
||||
** always differs from a non-NULL pointer.
|
||||
*/
|
||||
int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){
|
||||
int sqlite3ExprListCompare(const ExprList *pA, const ExprList *pB, int iTab){
|
||||
int i;
|
||||
if( pA==0 && pB==0 ) return 0;
|
||||
if( pA==0 || pB==0 ) return 1;
|
||||
@ -5484,7 +5493,7 @@ int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){
|
||||
** Like sqlite3ExprCompare() except COLLATE operators at the top-level
|
||||
** are ignored.
|
||||
*/
|
||||
int sqlite3ExprCompareSkip(Expr *pA, Expr *pB, int iTab){
|
||||
int sqlite3ExprCompareSkip(Expr *pA,Expr *pB, int iTab){
|
||||
return sqlite3ExprCompare(0,
|
||||
sqlite3ExprSkipCollateAndLikely(pA),
|
||||
sqlite3ExprSkipCollateAndLikely(pB),
|
||||
@ -5498,9 +5507,9 @@ int sqlite3ExprCompareSkip(Expr *pA, Expr *pB, int iTab){
|
||||
** non-NULL if pNN is not NULL
|
||||
*/
|
||||
static int exprImpliesNotNull(
|
||||
Parse *pParse, /* Parsing context */
|
||||
Expr *p, /* The expression to be checked */
|
||||
Expr *pNN, /* The expression that is NOT NULL */
|
||||
const Parse *pParse,/* Parsing context */
|
||||
const Expr *p, /* The expression to be checked */
|
||||
const Expr *pNN, /* The expression that is NOT NULL */
|
||||
int iTab, /* Table being evaluated */
|
||||
int seenNot /* Return true only if p can be any non-NULL value */
|
||||
){
|
||||
@ -5593,7 +5602,12 @@ static int exprImpliesNotNull(
|
||||
** improvement. Returning false might cause a performance reduction, but
|
||||
** it will always give the correct answer and is hence always safe.
|
||||
*/
|
||||
int sqlite3ExprImpliesExpr(Parse *pParse, Expr *pE1, Expr *pE2, int iTab){
|
||||
int sqlite3ExprImpliesExpr(
|
||||
const Parse *pParse,
|
||||
const Expr *pE1,
|
||||
const Expr *pE2,
|
||||
int iTab
|
||||
){
|
||||
if( sqlite3ExprCompare(pParse, pE1, pE2, iTab)==0 ){
|
||||
return 1;
|
||||
}
|
||||
|
@ -4110,7 +4110,7 @@ void sqlite3WindowListDelete(sqlite3 *db, Window *p);
|
||||
Window *sqlite3WindowAlloc(Parse*, int, int, Expr*, int , Expr*, u8);
|
||||
void sqlite3WindowAttach(Parse*, Expr*, Window*);
|
||||
void sqlite3WindowLink(Select *pSel, Window *pWin);
|
||||
int sqlite3WindowCompare(Parse*, Window*, Window*, int);
|
||||
int sqlite3WindowCompare(const Parse*, const Window*, const Window*, int);
|
||||
void sqlite3WindowCodeInit(Parse*, Select*);
|
||||
void sqlite3WindowCodeStep(Parse*, Select*, WhereInfo*, int, int);
|
||||
int sqlite3WindowRewrite(Parse*, Select*);
|
||||
@ -4573,10 +4573,10 @@ void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
|
||||
void sqlite3Vacuum(Parse*,Token*,Expr*);
|
||||
int sqlite3RunVacuum(char**, sqlite3*, int, sqlite3_value*);
|
||||
char *sqlite3NameFromToken(sqlite3*, const Token*);
|
||||
int sqlite3ExprCompare(Parse*,Expr*, Expr*, int);
|
||||
int sqlite3ExprCompareSkip(Expr*, Expr*, int);
|
||||
int sqlite3ExprListCompare(ExprList*, ExprList*, int);
|
||||
int sqlite3ExprImpliesExpr(Parse*,Expr*, Expr*, int);
|
||||
int sqlite3ExprCompare(const Parse*,const Expr*,const Expr*, int);
|
||||
int sqlite3ExprCompareSkip(Expr*,Expr*,int);
|
||||
int sqlite3ExprListCompare(const ExprList*,const ExprList*, int);
|
||||
int sqlite3ExprImpliesExpr(const Parse*,const Expr*,const Expr*, int);
|
||||
int sqlite3ExprImpliesNonNullRow(Expr*,int);
|
||||
void sqlite3AggInfoPersistWalkerInit(Walker*,Parse*);
|
||||
void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
|
||||
@ -4835,7 +4835,7 @@ sqlite3_value *sqlite3ValueNew(sqlite3 *);
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
|
||||
#endif
|
||||
int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
|
||||
int sqlite3ValueFromExpr(sqlite3 *, const Expr *, u8, u8, sqlite3_value **);
|
||||
void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
|
||||
#ifndef SQLITE_AMALGAMATION
|
||||
extern const unsigned char sqlite3OpcodeProperty[];
|
||||
|
@ -1388,7 +1388,7 @@ static sqlite3_value *valueNew(sqlite3 *db, struct ValueNewStat4Ctx *p){
|
||||
#ifdef SQLITE_ENABLE_STAT4
|
||||
static int valueFromFunction(
|
||||
sqlite3 *db, /* The database connection */
|
||||
Expr *p, /* The expression to evaluate */
|
||||
const Expr *p, /* The expression to evaluate */
|
||||
u8 enc, /* Encoding to use */
|
||||
u8 aff, /* Affinity to use */
|
||||
sqlite3_value **ppVal, /* Write the new value here */
|
||||
@ -1482,7 +1482,7 @@ static int valueFromFunction(
|
||||
*/
|
||||
static int valueFromExpr(
|
||||
sqlite3 *db, /* The database connection */
|
||||
Expr *pExpr, /* The expression to evaluate */
|
||||
const Expr *pExpr, /* The expression to evaluate */
|
||||
u8 enc, /* Encoding to use */
|
||||
u8 affinity, /* Affinity to use */
|
||||
sqlite3_value **ppVal, /* Write the new value here */
|
||||
@ -1637,7 +1637,7 @@ no_mem:
|
||||
*/
|
||||
int sqlite3ValueFromExpr(
|
||||
sqlite3 *db, /* The database connection */
|
||||
Expr *pExpr, /* The expression to evaluate */
|
||||
const Expr *pExpr, /* The expression to evaluate */
|
||||
u8 enc, /* Encoding to use */
|
||||
u8 affinity, /* Affinity to use */
|
||||
sqlite3_value **ppVal /* Write the new value here */
|
||||
|
@ -1345,7 +1345,12 @@ void sqlite3WindowLink(Select *pSel, Window *pWin){
|
||||
** different, or 2 if it cannot be determined if the objects are identical
|
||||
** or not. Identical window objects can be processed in a single scan.
|
||||
*/
|
||||
int sqlite3WindowCompare(Parse *pParse, Window *p1, Window *p2, int bFilter){
|
||||
int sqlite3WindowCompare(
|
||||
const Parse *pParse,
|
||||
const Window *p1,
|
||||
const Window *p2,
|
||||
int bFilter
|
||||
){
|
||||
int res;
|
||||
if( NEVER(p1==0) || NEVER(p2==0) ) return 1;
|
||||
if( p1->eFrmType!=p2->eFrmType ) return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user