From: drh Date: Thu, 23 Jun 2005 03:15:07 +0000 (+0000) Subject: Make sure the String8 opcode always has a non-null P3 argument in X-Git-Tag: version-3.6.10~3634 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f471496913a58a9d8f2c5852275a0666dc169df;p=thirdparty%2Fsqlite.git 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 --- diff --git a/manifest b/manifest index c2a3bda225..d90b7712e8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sbuilt-in\sfunctions\snumeric(),\stext(),\sand\sblob()\sthat\scoerce\stypes.\r\nTicket\s#1287.\s(CVS\s2524) -D 2005-06-22T10:53:59 +C Make\ssure\sthe\sString8\sopcode\salways\shas\sa\snon-null\sP3\sargument\sin\nthe\sforeign_key_list\spragma.\s\sTicket\s#1297.\s(CVS\s2525) +D 2005-06-23T03:15:08 F Makefile.in 64a6635ef44a98325e0cffe8d67669920a3dad47 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -56,7 +56,7 @@ F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b F src/pager.c 841a2cdddd4275de36cda26ed9dc54ae942660ce F src/pager.h 0d9153d6269d60d04af3dd84a0cc0a96253cf4a4 F src/parse.y 72cd7553f05fbc7b63ea9476108d0da6237f2818 -F src/pragma.c 5ea2ba0e43f6a83968a936b071b77bd4516d11f0 +F src/pragma.c dea86dad2f0e872b29632ae9fba526e539a4ddd8 F src/prepare.c d53602d2f8e097225ae7c76ec764ae68f759ba47 F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357 F src/random.c 90adff4e73a3b249eb4f1fc2a6ff9cf78c7233a4 @@ -281,7 +281,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b -P f3427a139c3bd4faf9134ec6290b3eb829c0a19f -R 71ae20ec723bd0f4ef99d2a15e3563f6 +P affb0fa2e8c5ff497838ba3c2994cdb1f6f50c68 +R 42d4c8589393348bc0163ea0519a9b65 U drh -Z 9f6943b255fa6f70bc55d3e3a0442f66 +Z 3f4d130920cda0cbea18523ee72fbcdb diff --git a/manifest.uuid b/manifest.uuid index 31646f2545..d870164a5d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -affb0fa2e8c5ff497838ba3c2994cdb1f6f50c68 \ No newline at end of file +bcf62dc7a1e8e7a3180138cf9b8944eb8fbd5490 \ No newline at end of file diff --git a/src/pragma.c b/src/pragma.c index a1aab2e592..38ad879c49 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; jnCol; 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;