diff options
author | drh <> | 2024-03-19 13:31:54 +0000 |
---|---|---|
committer | drh <> | 2024-03-19 13:31:54 +0000 |
commit | 4b42b5259f151aad0ece49b7132a6bc2e40b262f (patch) | |
tree | 82fae5e75de8fe0e4627c5b8d2363095dac00a6d /src/build.c | |
parent | 108dd6a52d3679cc3a772600ac22de792f92c897 (diff) | |
download | sqlite-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/build.c')
-rw-r--r-- | src/build.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/build.c b/src/build.c index 15f8fe1d2..1bc6008ec 100644 --- a/src/build.c +++ b/src/build.c @@ -3006,9 +3006,12 @@ void sqlite3CreateView( ** on a view, even though views do not have rowids. The following flag ** setting fixes this problem. But the fix can be disabled by compiling ** with -DSQLITE_ALLOW_ROWID_IN_VIEW in case there are legacy apps that - ** depend upon the old buggy behavior. */ -#ifndef SQLITE_ALLOW_ROWID_IN_VIEW - p->tabFlags |= TF_NoVisibleRowid; + ** depend upon the old buggy behavior. The ability can also be toggled + ** using SQLITE_TESTCTRL_ROWID_IN_VIEW */ +#ifdef SQLITE_ALLOW_ROWID_IN_VIEW + p->tabFlags |= sqlite3Config.mNoVisibleRowid; /* Optional. Allow by default */ +#else + p->tabFlags |= TF_NoVisibleRowid; /* Never allow rowid in view */ #endif sqlite3TwoPartName(pParse, pName1, pName2, &pName); |