mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Reload the entire schema after renaming a column in order to ensure that the
schema for any tables for which parent key definitions were changed are reloaded. FossilOrigin-Name: f4497b0136e9fcb1121a834c86f84eeaf8f1e7d3157d409484e086bcef3487f1
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user