mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Do not allow ALTER TABLE RENAME COLUMN on a virtual table.
FossilOrigin-Name: f6d6b472713c21deace3fd52c0b0b6901d758af043c238f004fabe52b01f730c
This commit is contained in:
@@ -817,6 +817,13 @@ void sqlite3AlterRenameColumn(
|
||||
/* Cannot alter a system table */
|
||||
if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ) goto exit_rename_column;
|
||||
|
||||
/* Cannot rename columns of a virtual table */
|
||||
if( IsVirtual(pTab) ){
|
||||
sqlite3ErrorMsg(pParse, "cannot rename columns in a virtual table (%s)",
|
||||
pTab->zName);
|
||||
goto exit_rename_column;
|
||||
}
|
||||
|
||||
/* Which schema holds the table to be altered */
|
||||
iSchema = sqlite3SchemaToIndex(db, pTab->pSchema);
|
||||
assert( iSchema>=0 );
|
||||
|
||||
Reference in New Issue
Block a user