aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <>2024-03-19 13:31:54 +0000
committerdrh <>2024-03-19 13:31:54 +0000
commit4b42b5259f151aad0ece49b7132a6bc2e40b262f (patch)
tree82fae5e75de8fe0e4627c5b8d2363095dac00a6d /src/sqliteInt.h
parent108dd6a52d3679cc3a772600ac22de792f92c897 (diff)
downloadsqlite-4b42b5259f151aad0ece49b7132a6bc2e40b262f.tar.gz
sqlite-4b42b5259f151aad0ece49b7132a6bc2e40b262f.zip
When compiled with SQLITE_ALLOW_ROWID_IN_VIEW, rowid-in-view is on by default
but can now be turned off using SQLITE_TESTCTRL_ROWID_IN_VIEW. Without the compile-time option, rowid-in-view is always off. FossilOrigin-Name: 8a6196ab29052071be753c5c77ac945c2d62ecc8019c6160f954eafe34ab05a8
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 8d18bfdfb..9fdc721e4 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -2535,6 +2535,15 @@ struct Table {
#define HasRowid(X) (((X)->tabFlags & TF_WithoutRowid)==0)
#define VisibleRowid(X) (((X)->tabFlags & TF_NoVisibleRowid)==0)
+/* Macro is true if the SQLITE_ALLOW_ROWID_IN_VIEW (mis-)feature is
+** available. By default, this macro is false
+*/
+#ifndef SQLITE_ALLOW_ROWID_IN_VIEW
+# define ViewCanHaveRowid 0
+#else
+# define ViewCanHaveRowid (sqlite3Config.mNoVisibleRowid==0)
+#endif
+
/*
** Each foreign key constraint is an instance of the following structure.
**
@@ -4254,6 +4263,11 @@ struct Sqlite3Config {
#ifndef SQLITE_UNTESTABLE
int (*xTestCallback)(int); /* Invoked by sqlite3FaultSim() */
#endif
+#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
+ u32 mNoVisibleRowid; /* TF_NoVisibleRowid if the ROWID_IN_VIEW
+ ** feature is disabled. 0 if rowids can
+ ** occur in views. */
+#endif
int bLocaltimeFault; /* True to fail localtime() calls */
int (*xAltLocaltime)(const void*,void*); /* Alternative localtime() routine */
int iOnceResetThreshold; /* When to reset OP_Once counters */