/ Check-in [e5897daf]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem with using virtual tables via reuse-schema connections.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | reuse-schema
Files: files | file ages | folders
SHA3-256:e5897dafda2b003c34eeecb44e091e2ac0d8589c9db728a0b02fb56966cfc9b7
User & Date: dan 2018-10-08 20:57:35
Context
2018-10-08
23:29
Add the ability to open a database connection in -reuseschema mode in the CLI. Adjust memory allocation accounting so that a shared schema is allocated across each database sharing it. Leaf check-in: 3869b210 user: drh tags: reuse-schema
20:57
Fix a problem with using virtual tables via reuse-schema connections. check-in: e5897daf user: dan tags: reuse-schema
20:37
Merge fixes from trunk. check-in: 9c8255a1 user: drh tags: reuse-schema
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/callback.c.

473
474
475
476
477
478
479
480


481
482
483
484
485
486
487
/*
** Check that the schema of db iDb is writable (either because it is the temp
** db schema or because the db handle was opened without
** SQLITE_OPEN_REUSE_SCHEMA). If so, do nothing. Otherwise, leave an 
** error in the Parse object.
*/
void sqlite3SchemaWritable(Parse *pParse, int iDb){
  if( iDb!=1 && (pParse->db->openFlags & SQLITE_OPEN_REUSE_SCHEMA) ){


    sqlite3ErrorMsg(pParse, "attempt to modify read-only schema");
  }
}

/*
** Replace the Schema object currently associated with database iDb with
** an empty schema object, ready to be populated. If there are multiple







|
>
>







473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
/*
** Check that the schema of db iDb is writable (either because it is the temp
** db schema or because the db handle was opened without
** SQLITE_OPEN_REUSE_SCHEMA). If so, do nothing. Otherwise, leave an 
** error in the Parse object.
*/
void sqlite3SchemaWritable(Parse *pParse, int iDb){
  if( iDb!=1 && (pParse->db->openFlags & SQLITE_OPEN_REUSE_SCHEMA) 
   && IN_DECLARE_VTAB==0
  ){
    sqlite3ErrorMsg(pParse, "attempt to modify read-only schema");
  }
}

/*
** Replace the Schema object currently associated with database iDb with
** an empty schema object, ready to be populated. If there are multiple