mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Rename DbSchema to "Schema" and SqliteTsd to "ThreadData". (CVS 2893)
FossilOrigin-Name: 82b81f69c78cb3f54634d9aea4f6a838474dc5e5
This commit is contained in:
@@ -81,14 +81,14 @@ void sqlite3BeginTrigger(
|
||||
** If sqlite3SrcListLookup() returns 0, indicating the table does not
|
||||
** exist, the error is caught by the block below.
|
||||
*/
|
||||
if( !pTableName || sqlite3Tsd()->mallocFailed ) goto trigger_cleanup;
|
||||
if( !pTableName || sqlite3ThreadData()->mallocFailed ) goto trigger_cleanup;
|
||||
pTab = sqlite3SrcListLookup(pParse, pTableName);
|
||||
if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){
|
||||
iDb = 1;
|
||||
}
|
||||
|
||||
/* Ensure the table name matches database name and that the table exists */
|
||||
if( sqlite3Tsd()->mallocFailed ) goto trigger_cleanup;
|
||||
if( sqlite3ThreadData()->mallocFailed ) goto trigger_cleanup;
|
||||
assert( pTableName->nSrc==1 );
|
||||
if( sqlite3FixInit(&sFix, pParse, iDb, "trigger", pName) &&
|
||||
sqlite3FixSrcList(&sFix, pTableName) ){
|
||||
@@ -255,7 +255,7 @@ void sqlite3FinishTrigger(
|
||||
pDel = sqlite3HashInsert(&db->aDb[iDb].pSchema->trigHash,
|
||||
pTrig->name, strlen(pTrig->name)+1, pTrig);
|
||||
if( pDel ){
|
||||
assert( sqlite3Tsd()->mallocFailed && pDel==pTrig );
|
||||
assert( sqlite3ThreadData()->mallocFailed && pDel==pTrig );
|
||||
goto triggerfinish_cleanup;
|
||||
}
|
||||
n = strlen(pTrig->table) + 1;
|
||||
@@ -439,7 +439,7 @@ void sqlite3DropTrigger(Parse *pParse, SrcList *pName){
|
||||
int nName;
|
||||
sqlite3 *db = pParse->db;
|
||||
|
||||
if( sqlite3Tsd()->mallocFailed ) goto drop_trigger_cleanup;
|
||||
if( sqlite3ThreadData()->mallocFailed ) goto drop_trigger_cleanup;
|
||||
if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
|
||||
goto drop_trigger_cleanup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user