1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Enhancements to SQL query normalization for UPDATE statements.

FossilOrigin-Name: bba975c7af3de9aeb5c62fb8b05d61b96e4ecd0b030008442bbdd345e1e5f134
This commit is contained in:
mistachkin
2019-10-16 17:46:22 +00:00
parent 2da8d6fe74
commit 16fd04cdbe
5 changed files with 46 additions and 15 deletions

View File

@@ -289,6 +289,10 @@ void sqlite3Update(
sNC.uNC.pUpsert = pUpsert;
sNC.ncFlags = NC_UUpsert;
/* Begin generating code. */
v = sqlite3GetVdbe(pParse);
if( v==0 ) goto update_cleanup;
/* Resolve the column names in all the expressions of the
** of the UPDATE statement. Also find the column index
** for each column to be updated in the pChanges array. For each
@@ -386,9 +390,6 @@ void sqlite3Update(
memset(aToOpen, 1, nIdx+1);
}
/* Begin generating code. */
v = sqlite3GetVdbe(pParse);
if( v==0 ) goto update_cleanup;
if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
sqlite3BeginWriteOperation(pParse, pTrigger || hasFK, iDb);