/ Check-in [bcf62dc7]
Login

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

Overview
Comment:Make sure the String8 opcode always has a non-null P3 argument in the foreign_key_list pragma. Ticket #1297. (CVS 2525)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bcf62dc7a1e8e7a3180138cf9b8944eb8fbd5490
User & Date: drh 2005-06-23 03:15:08
Context
2005-06-24
03:53
NULL values in a row of a unique index cause the row to be distinct. Ticket #1301. More testing and optimization needs to be done on this before closing the ticket. (CVS 2526) check-in: 06a71b16 user: drh tags: trunk
2005-06-23
03:15
Make sure the String8 opcode always has a non-null P3 argument in the foreign_key_list pragma. Ticket #1297. (CVS 2525) check-in: bcf62dc7 user: drh tags: trunk
2005-06-22
10:53
Add built-in functions numeric(), text(), and blob() that coerce types. Ticket #1287. (CVS 2524) check-in: affb0fa2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the PRAGMA command.
    13     13   **
    14         -** $Id: pragma.c,v 1.95 2005/06/12 21:35:52 drh Exp $
           14  +** $Id: pragma.c,v 1.96 2005/06/23 03:15:08 drh Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   #include "os.h"
    18     18   #include <ctype.h>
    19     19   
    20     20   /* Ignore this whole file if pragmas are disabled
    21     21   */
................................................................................
   579    579           sqlite3VdbeSetColName(v, 1, "seq", P3_STATIC);
   580    580           sqlite3VdbeSetColName(v, 2, "table", P3_STATIC);
   581    581           sqlite3VdbeSetColName(v, 3, "from", P3_STATIC);
   582    582           sqlite3VdbeSetColName(v, 4, "to", P3_STATIC);
   583    583           while(pFK){
   584    584             int j;
   585    585             for(j=0; j<pFK->nCol; j++){
          586  +            char *zCol = pFK->aCol[j].zCol;
   586    587               sqlite3VdbeAddOp(v, OP_Integer, i, 0);
   587    588               sqlite3VdbeAddOp(v, OP_Integer, j, 0);
   588    589               sqlite3VdbeOp3(v, OP_String8, 0, 0, pFK->zTo, 0);
   589    590               sqlite3VdbeOp3(v, OP_String8, 0, 0,
   590    591                                pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
   591         -            sqlite3VdbeOp3(v, OP_String8, 0, 0, pFK->aCol[j].zCol, 0);
          592  +            sqlite3VdbeOp3(v, zCol ? OP_String8 : OP_Null, 0, 0, zCol, 0);
   592    593               sqlite3VdbeAddOp(v, OP_Callback, 5, 0);
   593    594             }
   594    595             ++i;
   595    596             pFK = pFK->pNextFrom;
   596    597           }
   597    598         }
   598    599       }