/ Check-in [5d381daa]
Login

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

Overview
Comment:Suppress some harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5d381daa6e5248ec171aa682e2dad058d4012f24
User & Date: drh 2009-10-13 13:08:19
Context
2009-10-13
15:36
When a write transaction fails to being because the database is read-only, fail right away. Do not give the error code an opportunity to be overwritten with SQLITE_OK. Ticket [5ee23731f15]. check-in: bc110117 user: drh tags: trunk
13:08
Suppress some harmless compiler warnings. check-in: 5d381daa user: drh tags: trunk
12:48
Make sure mem3.c releases its mutex on an sqlite3_shutdown() call. check-in: 16254ad5 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/alter.c.

   113    113     unsigned char const *zOld = sqlite3_value_text(argv[1]);
   114    114     unsigned char const *zNew = sqlite3_value_text(argv[2]);
   115    115   
   116    116     unsigned const char *z;         /* Pointer to token */
   117    117     int n;                          /* Length of token z */
   118    118     int token;                      /* Type of token */
   119    119   
          120  +  UNUSED_PARAMETER(NotUsed);
   120    121     for(z=zInput; *z; z=z+n){
   121    122       n = sqlite3GetToken(z, &token);
   122    123       if( token==TK_REFERENCES ){
   123    124         char *zParent;
   124    125         do {
   125    126           z += n;
   126    127           n = sqlite3GetToken(z, &token);

Changes to src/fkey.c.

   494    494       const char *zCol;             /* Name of column in child table */
   495    495   
   496    496       pLeft = sqlite3Expr(db, TK_REGISTER, 0);
   497    497       if( pLeft ){
   498    498         /* Set the collation sequence and affinity of the LHS of each TK_EQ
   499    499         ** expression to the parent key column defaults.  */
   500    500         if( pIdx ){
   501         -        int iCol = pIdx->aiColumn[i];
   502         -        Column *pCol = &pIdx->pTable->aCol[iCol];
          501  +        Column *pCol;
          502  +        iCol = pIdx->aiColumn[i];
          503  +        pCol = &pIdx->pTable->aCol[iCol];
   503    504           pLeft->iTable = regData+iCol+1;
   504    505           pLeft->affinity = pCol->affinity;
   505    506           pLeft->pColl = sqlite3LocateCollSeq(pParse, pCol->zColl);
   506    507         }else{
   507    508           pLeft->iTable = regData;
   508    509           pLeft->affinity = SQLITE_AFF_INTEGER;
   509    510         }
................................................................................
   953    954   
   954    955     if( action!=OE_None && !pTrigger ){
   955    956       u8 enableLookaside;           /* Copy of db->lookaside.bEnabled */
   956    957       char const *zFrom;            /* Name of child table */
   957    958       int nFrom;                    /* Length in bytes of zFrom */
   958    959       Index *pIdx = 0;              /* Parent key index for this FK */
   959    960       int *aiCol = 0;               /* child table cols -> parent key cols */
   960         -    TriggerStep *pStep;           /* First (only) step of trigger program */
          961  +    TriggerStep *pStep = 0;        /* First (only) step of trigger program */
   961    962       Expr *pWhere = 0;             /* WHERE clause of trigger step */
   962    963       ExprList *pList = 0;          /* Changes list if ON UPDATE CASCADE */
   963    964       Select *pSelect = 0;          /* If RESTRICT, "SELECT RAISE(...)" */
   964    965       int i;                        /* Iterator variable */
   965    966       Expr *pWhen = 0;              /* WHEN clause for the trigger */
   966    967   
   967    968       if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;