diff options
author | drh <drh@noemail.net> | 2018-08-14 20:38:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-08-14 20:38:18 +0000 |
commit | af4023de221b0eebbadaa47b076f58b6a2043ee2 (patch) | |
tree | 56b10409d3ccecfa380fabf3dac926c4f02a6f4f /src | |
parent | 1595abcda65adeaf8bddaba36d133b414ff86cdf (diff) | |
download | sqlite-af4023de221b0eebbadaa47b076f58b6a2043ee2.tar.gz sqlite-af4023de221b0eebbadaa47b076f58b6a2043ee2.zip |
Do not allow ALTER TABLE RENAME COLUMN on a virtual table.
FossilOrigin-Name: f6d6b472713c21deace3fd52c0b0b6901d758af043c238f004fabe52b01f730c
Diffstat (limited to 'src')
-rw-r--r-- | src/alter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/alter.c b/src/alter.c index 09cbd75bc..12f57db18 100644 --- a/src/alter.c +++ b/src/alter.c @@ -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 ); |