1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Change the SQLITE_CONFIG_NO_ROWID_IN_VIEW configuration option to be

just SQLITE_CONFIG_ROWID_IN_VIEW (without the "_NO_" in the middle) and give
it the ability to turn the option on and off.  Otherwise, it is difficult
to test.

FossilOrigin-Name: 5d412edc2e378999ad798d1d7d73c7f7a17ee4e3c751a0dd00b9d5ce32759550
This commit is contained in:
drh
2024-03-19 23:01:56 +00:00
parent 36f01f2ee3
commit 254729edb7
6 changed files with 37 additions and 25 deletions

View File

@@ -765,9 +765,14 @@ int sqlite3_config(int op, ...){
}
#endif /* SQLITE_OMIT_DESERIALIZE */
case SQLITE_CONFIG_NO_ROWID_IN_VIEW: {
case SQLITE_CONFIG_ROWID_IN_VIEW: {
int *pVal = va_arg(ap,int*);
#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
sqlite3GlobalConfig.mNoVisibleRowid = TF_NoVisibleRowid;
if( 0==*pVal ) sqlite3GlobalConfig.mNoVisibleRowid = TF_NoVisibleRowid;
if( 1==*pVal ) sqlite3GlobalConfig.mNoVisibleRowid = 0;
*pVal = (sqlite3GlobalConfig.mNoVisibleRowid==0);
#else
*pVal = 0;
#endif
break;
}