Index: src/alter.c ================================================================== --- src/alter.c +++ src/alter.c @@ -1269,11 +1269,13 @@ } /* ** SQL function: ** -** sqlite_rename_column(zSql, iCol, bQuote, zNew, zTable, zOld) +** sqlite_rename_column(...) +** +** The function requires exactly 10 arguments: ** ** 0. zSql: SQL statement to rewrite ** 1. type: Type of object ("table", "view" etc.) ** 2. object: Name of object ** 3. Database: Database name (e.g. "main") @@ -1290,11 +1292,13 @@ ** The iCol-th column (left-most is 0) of table zTable is renamed from zCol ** into zNew. The name should be quoted if bQuote is true. ** ** This function is used internally by the ALTER TABLE RENAME COLUMN command. ** It is only accessible to SQL created using sqlite3NestedParse(). It is -** not reachable from ordinary SQL passed into sqlite3_prepare(). +** not reachable from ordinary SQL passed into sqlite3_prepare(). Except, +** this function is reachable for testing purposes if the +** SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control is engaged. */ static void renameColumnFunc( sqlite3_context *context, int NotUsed, sqlite3_value **argv Index: src/resolve.c ================================================================== --- src/resolve.c +++ src/resolve.c @@ -816,11 +816,13 @@ if( (pDef->funcFlags & SQLITE_FUNC_INTERNAL)!=0 && pParse->nested==0 && sqlite3Config.bInternalFunctions==0 ){ /* Internal-use-only functions are disallowed unless the - ** SQL is being compiled using sqlite3NestedParse() */ + ** SQL is being compiled using sqlite3NestedParse(). The + ** SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control will override + ** this restriction for testing purposes. */ no_such_func = 1; pDef = 0; } }