mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Do not crash when compiling an "INSERT INTO tbl DEFAULT VALUES" when tbl has either BEFORE or INSTEAD OF triggers attached to it. Ticket [f3162063fd].
FossilOrigin-Name: ca359a3e8048bd11605c41c4b48134c0343e543b
This commit is contained in:
@@ -846,7 +846,7 @@ void sqlite3Insert(
|
||||
if( pColumn->a[j].idx==i ) break;
|
||||
}
|
||||
}
|
||||
if( pColumn && j>=pColumn->nId ){
|
||||
if( (!useTempTable && !pList) || (pColumn && j>=pColumn->nId) ){
|
||||
sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regCols+i+1);
|
||||
}else if( useTempTable ){
|
||||
sqlite3VdbeAddOp3(v, OP_Column, srcTab, j, regCols+i+1);
|
||||
|
||||
Reference in New Issue
Block a user