aboutsummaryrefslogtreecommitdiff
path: root/test/fuzzinvariants.c
diff options
context:
space:
mode:
authordrh <>2024-04-07 18:36:32 +0000
committerdrh <>2024-04-07 18:36:32 +0000
commitfa4c4247a573b0f8f5875fba23b1c5a19562c44e (patch)
treeb8cdfbd0c604c42da48dc083c33756146337f557 /test/fuzzinvariants.c
parent1152def76ecc8bfb95a51562b6bad949471f6863 (diff)
downloadsqlite-fa4c4247a573b0f8f5875fba23b1c5a19562c44e.tar.gz
sqlite-fa4c4247a573b0f8f5875fba23b1c5a19562c44e.zip
Omit all rowid-in-view restrictions from the fuzzinvariant.c test module
as they are no longer necessary, as of the previous check-in. FossilOrigin-Name: 6431538f0bb3bb8606786f3c3e5c055c4bc387098dd3bdc8a94f6fda61c47f52
Diffstat (limited to 'test/fuzzinvariants.c')
-rw-r--r--test/fuzzinvariants.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/fuzzinvariants.c b/test/fuzzinvariants.c
index 25b35d4f6..66475270b 100644
--- a/test/fuzzinvariants.c
+++ b/test/fuzzinvariants.c
@@ -223,19 +223,6 @@ not_a_fault:
return SQLITE_OK;
}
-#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
-/*
-** Return TRUE if the i-th column of pStmt might be a ROWID value.
-*/
-static int column_might_be_rowid(sqlite3_stmt *pStmt, int i){
- const char *zColName = sqlite3_column_name(pStmt, i);
- if( sqlite3_strlike("%rowid%",zColName,0)==0 ) return 1;
- if( sqlite3_strlike("%oid%",zColName,0)==0 ) return 1;
- return 0;
-}
-#endif /* SQLITE_ALLOW_ROWID_IN_VIEW */
-
-
/*
** Generate SQL used to test a statement invariant.
**
@@ -308,12 +295,6 @@ static char *fuzz_invariant_sql(sqlite3_stmt *pStmt, int iCnt){
** WHERE clause. */
continue;
}
-#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
- if( column_might_be_rowid(pBase,i) ){
- /* 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;
@@ -342,11 +323,6 @@ static char *fuzz_invariant_sql(sqlite3_stmt *pStmt, int iCnt){
/*
** Return true if and only if v1 and is the same as v2.
-**
-** When compiled with SQLITE_ALLOW_ROWID_IN_VIEW, and if either
-** v1 or v2 has a column name that indicates that it is a rowid
-** then a NULL value in the rowid column will compare equal to
-** an integer value in the other.
*/
static int sameValue(
sqlite3_stmt *pS1, int i1, /* Value to text on the left */
@@ -361,20 +337,6 @@ static int sameValue(
|| (t1==SQLITE_FLOAT && t2==SQLITE_INTEGER)
){
/* Comparison of numerics is ok */
-#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
- }else
- if( t1==SQLITE_INTEGER
- && t2==SQLITE_NULL
- && column_might_be_rowid(pS2,i2)
- ){
- return 1;
- }else
- if( t2==SQLITE_INTEGER
- && t1==SQLITE_NULL
- && column_might_be_rowid(pS1,i1)
- ){
- return 1;
-#endif /* SQLITE_ALLOW_ROWID_IN_VIEW */
}else{
return 0;
}