SQLite

Check-in [fb6ca99b88]
Login

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

Overview
Comment:Remove an unnecessary branch from the [be436a7f4587ce517ddc] fix.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fb6ca99b88c67414eab425e2b4ddb6a5e2fd48a6b2cd96a34627c86a5b568c9b
User & Date: drh 2017-08-17 14:47:56.368
Context
2017-08-17
18:17
The RTREE extension should return SQLITE_CORRUPT_VTAB, not just SQLITE_CORRUPT when it encounters incorrectly formatted shadow tables. (check-in: 0712f057ef user: drh tags: trunk)
14:47
Remove an unnecessary branch from the [be436a7f4587ce517ddc] fix. (check-in: fb6ca99b88 user: drh tags: trunk)
14:12
Add test cases for ticket [be436a7f4587ce517] using virtual table modules fts5 and rtree. (check-in: 2101b42087 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/prepare.c.
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
  *ppStmt = 0;
  if( !sqlite3SafetyCheckOk(db)||zSql==0 ){
    return SQLITE_MISUSE_BKPT;
  }
  sqlite3_mutex_enter(db->mutex);
  sqlite3BtreeEnterAll(db);
  rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
  if( rc==SQLITE_SCHEMA && db->nSchemaLock==0 ){
    sqlite3ResetOneSchema(db, -1);
    sqlite3_finalize(*ppStmt);
    rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
  }
  sqlite3BtreeLeaveAll(db);
  sqlite3_mutex_leave(db->mutex);
  assert( rc==SQLITE_OK || *ppStmt==0 );







|







682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
  *ppStmt = 0;
  if( !sqlite3SafetyCheckOk(db)||zSql==0 ){
    return SQLITE_MISUSE_BKPT;
  }
  sqlite3_mutex_enter(db->mutex);
  sqlite3BtreeEnterAll(db);
  rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
  if( rc==SQLITE_SCHEMA ){
    sqlite3ResetOneSchema(db, -1);
    sqlite3_finalize(*ppStmt);
    rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
  }
  sqlite3BtreeLeaveAll(db);
  sqlite3_mutex_leave(db->mutex);
  assert( rc==SQLITE_OK || *ppStmt==0 );