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

Fix the SQLITE_ALLOW_ROWID_IN_VIEW bug-compatibility option so that it works

again.  Add the SQLITE_CONFIG_ROWID_IN_VIEW sqlite3_config() value
to optionally disable the bug-compatibility mode at start-time.  Enable
testing of SQLITE_ALLOW_ROWID_IN_VIEW.

FossilOrigin-Name: acc08353e27a960bf949cfc5f94e874a91e1c42fd7a26617dc24cf549fa9b120
This commit is contained in:
drh
2024-03-20 11:04:38 +00:00
parent 0febad8fdf
commit 8276a5f336
19 changed files with 252 additions and 78 deletions

View File

@@ -296,6 +296,14 @@ static char *fuzz_invariant_sql(sqlite3_stmt *pStmt, int iCnt){
** WHERE clause. */
continue;
}
#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
if( sqlite3_strlike("%rowid%",zColName,0)==0
|| sqlite3_strlike("%oid%",zColName,0)==0
){
/* ROWID values are unreliable if SQLITE_ALLOW_ROWID_IN_VIEW is used */
continue;
}
#endif
for(j=0; j<i; j++){
const char *zPrior = sqlite3_column_name(pBase, j);
if( sqlite3_stricmp(zPrior, zColName)==0 ) break;