1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Tighter checking of access constraints on union members in SrcItem.

Improved invariant checking.

FossilOrigin-Name: fd72d3400a8fe5747f494eee81654698acee350bb95b9db269e87d857af03492
This commit is contained in:
drh
2024-08-20 19:09:59 +00:00
parent ff176231da
commit 692c160360
9 changed files with 51 additions and 31 deletions

View File

@@ -151,7 +151,9 @@ void sqlite3BeginTrigger(
** To maintain backwards compatibility, ignore the database
** name on pTableName if we are reparsing out of the schema table
*/
if( db->init.busy && iDb!=1 && ALWAYS(pTableName->a[0].fg.fixedSchema==0) ){
if( db->init.busy && iDb!=1 ){
assert( pTableName->a[0].fg.fixedSchema==0 );
assert( pTableName->a[0].fg.isSubquery==0 );
sqlite3DbFree(db, pTableName->a[0].u4.zDatabase);
pTableName->a[0].u4.zDatabase = 0;
}
@@ -631,7 +633,7 @@ void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
}
assert( pName->nSrc==1 );
assert( pName->a[0].fg.fixedSchema==0 );
assert( pName->a[0].fg.fixedSchema==0 && pName->a[0].fg.isSubquery==0 );
zDb = pName->a[0].u4.zDatabase;
zName = pName->a[0].zName;
assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );