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

When running ALTER TABLE, avoid adding some internally generated tokens to the token map to improve performance on schemas with nested views.

FossilOrigin-Name: 4cf8721f5ceb1fdaefdc355b3211f75c53c4cdf9d2582ca70fc96777a9b057c2
This commit is contained in:
dan
2020-04-06 16:37:05 +00:00
parent 47f8ef32a0
commit 85f2c76cf9
3 changed files with 16 additions and 11 deletions

View File

@@ -1794,9 +1794,14 @@ void sqlite3ExprListSetName(
assert( pItem->zEName==0 );
assert( pItem->eEName==ENAME_NAME );
pItem->zEName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
if( dequote ) sqlite3Dequote(pItem->zEName);
if( IN_RENAME_OBJECT ){
sqlite3RenameTokenMap(pParse, (void*)pItem->zEName, pName);
if( dequote ){
/* If dequote==0, then pName->z does not point to part of a DDL
** statement handled by the parser. And so no token need be added
** to the token-map. */
sqlite3Dequote(pItem->zEName);
if( IN_RENAME_OBJECT ){
sqlite3RenameTokenMap(pParse, (void*)pItem->zEName, pName);
}
}
}
}