/ Check-in [853f3163]
Login

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

Overview
Comment:The SQLITE_ALLOW_SQLITE_MASTER_INDEX compile-time option allows a CREATE INDEX statement against the sqlite_master table. Once created, the index works, and is usable by legacy instances of SQLite.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:853f3163597b9946c0cbeb808ea6fd33a0cf48ae6b8f4459c4165db377f33a9e
User & Date: drh 2018-05-01 18:39:31
Context
2018-05-02
03:01
Add sqlite3_win32_set_directory8() and sqlite3_win32_set_directory16() functions. check-in: 22089ea2 user: mistachkin tags: trunk
00:33
Begin reengineering the EXPLAIN QUERY PLAN function to provide more intuitive output. check-in: 70b48a79 user: drh tags: rework-EQP
2018-05-01
18:39
The SQLITE_ALLOW_SQLITE_MASTER_INDEX compile-time option allows a CREATE INDEX statement against the sqlite_master table. Once created, the index works, and is usable by legacy instances of SQLite. check-in: 853f3163 user: drh tags: trunk
2018-04-28
19:08
Test cases added for SQLITE_DBCONFIG_RESET_DATABASE. check-in: 08665a9e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

  3020   3020     assert( pTab!=0 );
  3021   3021     assert( pParse->nErr==0 );
  3022   3022     if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 
  3023   3023          && db->init.busy==0
  3024   3024   #if SQLITE_USER_AUTHENTICATION
  3025   3025          && sqlite3UserAuthTable(pTab->zName)==0
  3026   3026   #endif
  3027         -       && sqlite3StrNICmp(&pTab->zName[7],"altertab_",9)!=0 ){
         3027  +#ifdef SQLITE_ALLOW_SQLITE_MASTER_INDEX
         3028  +       && sqlite3StrICmp(&pTab->zName[7],"master")!=0
         3029  +#endif
         3030  +       && sqlite3StrNICmp(&pTab->zName[7],"altertab_",9)!=0
         3031  + ){
  3028   3032       sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
  3029   3033       goto exit_create_index;
  3030   3034     }
  3031   3035   #ifndef SQLITE_OMIT_VIEW
  3032   3036     if( pTab->pSelect ){
  3033   3037       sqlite3ErrorMsg(pParse, "views may not be indexed");
  3034   3038       goto exit_create_index;