SQLite

Check-in [3656896335]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove the ALWAYS() added by the previous check-in. It is not needed.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 36568963356e3919e8b862e7e40ded2eae7ce187
User & Date: drh 2009-09-24 14:27:33.000
Context
2009-09-24
15:16
Fix a problem in fkey.c when a child key is the IPK of its table. (check-in: 8a000a8aae user: dan tags: trunk)
14:27
Remove the ALWAYS() added by the previous check-in. It is not needed. (check-in: 3656896335 user: drh tags: trunk)
13:48
Comment enhancements. Add an ALWAYS macro in fkey.c to indicate a branch that is always taken. (check-in: d5b714cfff user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/fkey.c.
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864

    /* In the current implementation, pTab->dbMem==0 for all tables except
    ** for temporary tables used to describe subqueries.  And temporary
    ** tables do not have foreign key constraints.  Hence, pTab->dbMem
    ** should always be 0 there.
    */
    enableLookaside = db->lookaside.bEnabled;
    if( ALWAYS(pTab->dbMem==0) ){
      db->lookaside.bEnabled = 0;
    }

    zFrom = pFKey->pFrom->zName;
    nFrom = sqlite3Strlen30(zFrom);
    pTrigger = (Trigger *)sqlite3DbMallocZero(db, 
        sizeof(Trigger) +         /* struct Trigger */
        sizeof(TriggerStep) +     /* Single step in trigger program */
        nFrom + 1                 /* Space for pStep->target.z */







<
|
<







848
849
850
851
852
853
854

855

856
857
858
859
860
861
862

    /* In the current implementation, pTab->dbMem==0 for all tables except
    ** for temporary tables used to describe subqueries.  And temporary
    ** tables do not have foreign key constraints.  Hence, pTab->dbMem
    ** should always be 0 there.
    */
    enableLookaside = db->lookaside.bEnabled;

    db->lookaside.bEnabled = 0;


    zFrom = pFKey->pFrom->zName;
    nFrom = sqlite3Strlen30(zFrom);
    pTrigger = (Trigger *)sqlite3DbMallocZero(db, 
        sizeof(Trigger) +         /* struct Trigger */
        sizeof(TriggerStep) +     /* Single step in trigger program */
        nFrom + 1                 /* Space for pStep->target.z */