1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Ensure that valid bytecode is generated for RETURNING clauses even if

the schema is corrupt and PRAGMA writable_schema is set so that the
schema parse returns no errors.
dbsqlfuzz cb21825bdcd6fdb4b686ce4f6e2f45e781d2f220

FossilOrigin-Name: 699117156e0b5a7beda606de56bd511af322e3efa4eee6e60f0a8d60561def64
This commit is contained in:
drh
2021-10-20 12:52:12 +00:00
parent fb8e71c584
commit 7132f4361b
4 changed files with 29 additions and 21 deletions

View File

@@ -4093,7 +4093,7 @@ case OP_OpenEphemeral: {
aMem[pOp->p3].z = "";
}
pCx = p->apCsr[pOp->p1];
if( pCx && !pCx->hasBeenDuped ){
if( pCx && !pCx->hasBeenDuped && ALWAYS(pOp->p2<=pCx->nField) ){
/* If the ephermeral table is already open and has no duplicates from
** OP_OpenDup, then erase all existing content so that the table is
** empty again, rather than creating a new table. */