aboutsummaryrefslogtreecommitdiff
path: root/src/alter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alter.c')
-rw-r--r--src/alter.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/alter.c b/src/alter.c
index d73b11a14..6bf2d4c0c 100644
--- a/src/alter.c
+++ b/src/alter.c
@@ -831,9 +831,12 @@ void sqlite3AlterRenameColumn(
zDb, MASTER_NAME, iCol, zNew, pTab->zName, zOld, pTab->zName
);
- /* Drop and reload the internal table schema. */
- sqlite3ChangeCookie(pParse, iSchema);
- reloadTableSchema(pParse, pTab, pTab->zName);
+ /* Drop and reload the database schema. */
+ if( db->mallocFailed==0 ){
+ assert( pParse->pVdbe );
+ sqlite3ChangeCookie(pParse, iSchema);
+ sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iSchema, 0);
+ }
exit_rename_column:
sqlite3SrcListDelete(db, pSrc);