1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Invoke the authorizer for ALTER TABLE RENAME COLUMN.

FossilOrigin-Name: fc293bcb3402f049fb9e22aacfb4fdcd13f8609edf29c97d6cb95ce351363873
This commit is contained in:
drh
2018-08-25 16:14:46 +00:00
parent 3a843f525c
commit 0d019b9243
4 changed files with 84 additions and 8 deletions

View File

@@ -856,6 +856,13 @@ void sqlite3AlterRenameColumn(
assert( iSchema>=0 );
zDb = db->aDb[iSchema].zDbSName;
#ifndef SQLITE_OMIT_AUTHORIZATION
/* Invoke the authorization callback. */
if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
goto exit_rename_column;
}
#endif
/* Make sure the old name really is a column name in the table to be
** altered. Set iCol to be the index of the column being renamed */
zOld = sqlite3NameFromToken(db, pOld);