1
0
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:
drh
2018-08-14 20:38:18 +00:00
parent 1595abcda6
commit af4023de22
3 changed files with 14 additions and 7 deletions

View File

@@ -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 );