mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Reduce the size of the SrcItem object by combining fields into a union.
FossilOrigin-Name: a4c59ac3c6ec979c25b544d29e47b8e39f6439c098eed8f84b3bd506c9adf047
This commit is contained in:
@@ -151,9 +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 ){
|
||||
sqlite3DbFree(db, pTableName->a[0].zDatabase);
|
||||
pTableName->a[0].zDatabase = 0;
|
||||
if( db->init.busy && iDb!=1 && ALWAYS(pTableName->a[0].fg.fixedSchema==0) ){
|
||||
sqlite3DbFree(db, pTableName->a[0].u4.zDatabase);
|
||||
pTableName->a[0].u4.zDatabase = 0;
|
||||
}
|
||||
|
||||
/* If the trigger name was unqualified, and the table is a temp table,
|
||||
@@ -631,7 +631,8 @@ void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
|
||||
}
|
||||
|
||||
assert( pName->nSrc==1 );
|
||||
zDb = pName->a[0].zDatabase;
|
||||
assert( pName->a[0].fg.fixedSchema==0 );
|
||||
zDb = pName->a[0].u4.zDatabase;
|
||||
zName = pName->a[0].zName;
|
||||
assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );
|
||||
for(i=OMIT_TEMPDB; i<db->nDb; i++){
|
||||
@@ -868,7 +869,9 @@ SrcList *sqlite3TriggerStepSrc(
|
||||
Schema *pSchema = pStep->pTrig->pSchema;
|
||||
pSrc->a[0].zName = zName;
|
||||
if( pSchema!=db->aDb[1].pSchema ){
|
||||
pSrc->a[0].pSchema = pSchema;
|
||||
assert( pSrc->a[0].fg.fixedSchema || pSrc->a[0].u4.zDatabase==0 );
|
||||
pSrc->a[0].u4.pSchema = pSchema;
|
||||
pSrc->a[0].fg.fixedSchema = 1;
|
||||
}
|
||||
if( pStep->pFrom ){
|
||||
SrcList *pDup = sqlite3SrcListDup(db, pStep->pFrom, 0);
|
||||
|
Reference in New Issue
Block a user