/ Check-in [916c52da]
Login

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

Overview
Comment:Change the error message slightly for when two or more indexes have the same rootpage.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:916c52dad414b224695d455a42af36f85dff216504c2aa67d1d2c5818cdca8d6
User & Date: drh 2019-01-30 19:50:07
Context
2019-01-31
01:39
Improvements to "PRAGMA parser_trace=ON": Make it a flag pragma, and then use the flag to show the complete SQL text at the beginning of the parse. check-in: 507c4353 user: drh tags: trunk
2019-01-30
19:50
Change the error message slightly for when two or more indexes have the same rootpage. check-in: 916c52da user: drh tags: trunk
19:12
When parsing the schema, check for duplicate index root page numbers before adding the index to the schema hash table. check-in: 6b360bc0 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

  3486   3486       if( db->init.busy ){
  3487   3487         Index *p;
  3488   3488         assert( !IN_SPECIAL_PARSE );
  3489   3489         assert( sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );
  3490   3490         if( pTblName!=0 ){
  3491   3491           pIndex->tnum = db->init.newTnum;
  3492   3492           if( sqlite3IndexHasDuplicateRootPage(pIndex) ){
  3493         -          sqlite3ErrorMsg(pParse, "invalid root page");
         3493  +          sqlite3ErrorMsg(pParse, "invalid rootpage");
  3494   3494             pParse->rc = SQLITE_CORRUPT_BKPT;
  3495   3495             goto exit_create_index;
  3496   3496           }
  3497   3497         }
  3498   3498         p = sqlite3HashInsert(&pIndex->pSchema->idxHash, 
  3499   3499             pIndex->zName, pIndex);
  3500   3500         if( p ){

Changes to test/corruptL.test.

   623    623   }]} {}
   624    624   
   625    625   do_catchsql_test 6.1 {
   626    626     BEGIN;
   627    627       INSERT INTO t1(b) VALUES(1);
   628    628       INSERT INTO t1(b) VALUES(2);
   629    629     COMMIT;
   630         -} {1 {malformed database schema (t1b) - invalid root page}}
          630  +} {1 {malformed database schema (t1b) - invalid rootpage}}
   631    631   
   632    632   #-------------------------------------------------------------------------
   633    633   reset_db
   634    634   do_test 7.0 {
   635    635     sqlite3 db {}
   636    636     db deserialize [decode_hexdb {
   637    637   | size 20480 pagesize 4096 filename crash-8391315d75edff.db
................................................................................
   716    716   | page 5 offset 16384
   717    717   |      0: 0d 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00   ................
   718    718   | end crash-8391315d75edff.db
   719    719   }]} {}
   720    720   
   721    721   do_catchsql_test 7.1 {
   722    722     SELECT * FROM sqlite_master;
   723         -} {1 {malformed database schema (t1x1) - invalid root page}}
          723  +} {1 {malformed database schema (t1x1) - invalid rootpage}}
   724    724   
   725    725   finish_test

Changes to test/fuzzdata8.db.

cannot compute difference between binary files