diff options
author | drh <drh@noemail.net> | 2005-06-23 03:15:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-06-23 03:15:07 +0000 |
commit | 2f471496913a58a9d8f2c5852275a0666dc169df (patch) | |
tree | e34232fb0f8b9e7746221eb4a09b71cef0631cf6 /src/pragma.c | |
parent | 5708d2deacccde4c3d6a5de48b74c9bb7cae8aee (diff) | |
download | sqlite-2f471496913a58a9d8f2c5852275a0666dc169df.tar.gz sqlite-2f471496913a58a9d8f2c5852275a0666dc169df.zip |
Make sure the String8 opcode always has a non-null P3 argument in
the foreign_key_list pragma. Ticket #1297. (CVS 2525)
FossilOrigin-Name: bcf62dc7a1e8e7a3180138cf9b8944eb8fbd5490
Diffstat (limited to 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pragma.c b/src/pragma.c index a1aab2e59..38ad879c4 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** -** $Id: pragma.c,v 1.95 2005/06/12 21:35:52 drh Exp $ +** $Id: pragma.c,v 1.96 2005/06/23 03:15:08 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -583,12 +583,13 @@ void sqlite3Pragma( while(pFK){ int j; for(j=0; j<pFK->nCol; j++){ + char *zCol = pFK->aCol[j].zCol; sqlite3VdbeAddOp(v, OP_Integer, i, 0); sqlite3VdbeAddOp(v, OP_Integer, j, 0); sqlite3VdbeOp3(v, OP_String8, 0, 0, pFK->zTo, 0); sqlite3VdbeOp3(v, OP_String8, 0, 0, pTab->aCol[pFK->aCol[j].iFrom].zName, 0); - sqlite3VdbeOp3(v, OP_String8, 0, 0, pFK->aCol[j].zCol, 0); + sqlite3VdbeOp3(v, zCol ? OP_String8 : OP_Null, 0, 0, zCol, 0); sqlite3VdbeAddOp(v, OP_Callback, 5, 0); } ++i; |