diff options
author | drh <> | 2021-01-30 01:30:26 +0000 |
---|---|---|
committer | drh <> | 2021-01-30 01:30:26 +0000 |
commit | ba71a8a01bf2559eefe526e3b44f07e9ff2da5b8 (patch) | |
tree | c851e999a8db9727ddc4bac9f927dece81125094 /src/vdbeaux.c | |
parent | 8f4e2e25c4b5bff5e43bca2f9f166ff48311d6a3 (diff) | |
download | sqlite-ba71a8a01bf2559eefe526e3b44f07e9ff2da5b8.tar.gz sqlite-ba71a8a01bf2559eefe526e3b44f07e9ff2da5b8.zip |
Test cases added. RETURNING works with UPSERT as does PG.
FossilOrigin-Name: f5698f96e27c9b8669ec6016bb9920ef7580c4146eb61d628a0f62be5135ce94
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 9ea20628f..c7c212575 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -2602,7 +2602,10 @@ void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){ void sqlite3VdbeColumnInfoXfer(Vdbe *pTo, Vdbe *pFrom){ sqlite3 *db = pTo->db; assert( db==pFrom->db ); - sqlite3DbFree(db, pTo->aColName); + if( pTo->nResColumn ){ + releaseMemArray(pTo->aColName, pTo->nResColumn*COLNAME_N); + sqlite3DbFree(db, pTo->aColName); + } pTo->aColName = pFrom->aColName; pFrom->aColName = 0; pTo->nResColumn = pFrom->nResColumn; |