Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a problem causing the sqlite_master entry corresponding to a virtual table to be removed by a DROP TABLE even if the call to the vtabs xDestroy() method failed. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0140f6dbfbea93eadcd7f727d84064a0 |
User & Date: | dan 2018-12-28 17:45:08.487 |
Context
2018-12-28
| ||
18:09 | Fix another problem with loading the structure record from a corrupt fts5 database. (check-in: c4d44542d2 user: dan tags: trunk) | |
17:45 | Fix a problem causing the sqlite_master entry corresponding to a virtual table to be removed by a DROP TABLE even if the call to the vtabs xDestroy() method failed. (check-in: 0140f6dbfb user: dan tags: trunk) | |
14:33 | Avoid an undefined left-shift operation in fts5 caused by malformed utf-8 text. (check-in: c3a3a11194 user: dan tags: trunk) | |
Changes
Changes to src/build.c.
︙ | |||
2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 | 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 | + | } /* Remove the table entry from SQLite's internal schema and modify ** the schema cookie. */ if( IsVirtual(pTab) ){ sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0); sqlite3MayAbort(pParse); } sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0); sqlite3ChangeCookie(pParse, iDb); sqliteViewResetAll(db, iDb); } /* |
︙ |
Changes to src/vdbe.c.
︙ | |||
6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 | 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 | + | ** P4 is the name of a virtual table in database P1. Call the xDestroy method ** of that table. */ case OP_VDestroy: { db->nVDestroy++; rc = sqlite3VtabCallDestroy(db, pOp->p1, pOp->p4.z); db->nVDestroy--; assert( p->errorAction==OE_Abort && p->usesStmtJournal ); if( rc ) goto abort_due_to_error; break; } #endif /* SQLITE_OMIT_VIRTUALTABLE */ #ifndef SQLITE_OMIT_VIRTUALTABLE /* Opcode: VOpen P1 * * P4 * |
︙ |
Changes to src/vdbeaux.c.
︙ | |||
599 600 601 602 603 604 605 606 607 608 609 610 611 612 | 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | + | VdbeOpIter sIter; memset(&sIter, 0, sizeof(sIter)); sIter.v = v; while( (pOp = opIterNext(&sIter))!=0 ){ int opcode = pOp->opcode; if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename || opcode==OP_VDestroy || ((opcode==OP_Halt || opcode==OP_HaltIfNull) && ((pOp->p1&0xff)==SQLITE_CONSTRAINT && pOp->p2==OE_Abort)) ){ hasAbort = 1; break; } if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1; |
︙ |
Added test/vtabdrop.test.