From: dan Date: Thu, 24 Sep 2009 15:16:33 +0000 (+0000) Subject: Fix a problem in fkey.c when a child key is the IPK of its table. X-Git-Tag: fts3-refactor~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c430041f5d6ac1d06a2642545a37f248f040201;p=thirdparty%2Fsqlite.git Fix a problem in fkey.c when a child key is the IPK of its table. FossilOrigin-Name: 8a000a8aae4d356e68acf2bc1788d2c40279522c --- diff --git a/manifest b/manifest index c9afb16573..8be5b67210 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,5 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -C Remove\sthe\sALWAYS()\sadded\sby\sthe\sprevious\scheck-in.\s\sIt\sis\snot\sneeded. -D 2009-09-24T14:27:33 +C Fix\sa\sproblem\sin\sfkey.c\swhen\sa\schild\skey\sis\sthe\sIPK\sof\sits\stable. +D 2009-09-24T15:16:34 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 4ca3f1dd6efa2075bcb27f4dc43eef749877740d F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -119,7 +116,7 @@ F src/date.c 657ff12ca0f1195b531561afacbb38b772d16638 F src/delete.c 2a3d6fc0861b2f8dbd9feb7847b390267b281c60 F src/expr.c c7f3f718bd5c392344ec8694a41c1824f30cf375 F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff -F src/fkey.c ba7fa13d98ec93dac4d3e4dac005a01e4afbe373 +F src/fkey.c d5610f840b76e7b478d9700df9f3be0ab96ba1b8 F src/func.c e536218d193b8d326aab91120bc4c6f28aa2b606 F src/global.c 271952d199a8cc59d4ce840b3bbbfd2f30c8ba32 F src/hash.c ebcaa921ffd9d86f7ea5ae16a0a29d1c871130a7 @@ -758,14 +755,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P d5b714cffffe588dd4dd10e0b82df8d99657be88 -R f832f56eba32c317bddff01fc0a5ee3c -U drh -Z 79a07d4778ef51d7121e2e1ab05e1d21 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQFKu4HZoxKgR168RlERAsUXAJ0a98aqFv54gsWAAeW0nOAOAu0wXwCghXRF -yzSx0CxFE4vkdccj6cNNj40= -=h0tT ------END PGP SIGNATURE----- +P 36568963356e3919e8b862e7e40ded2eae7ce187 +R eeabc59dbfe67ff6c77f0bd0a709b511 +U dan +Z a9a341c42976f5c033715d32119fb245 diff --git a/manifest.uuid b/manifest.uuid index d53c142fab..8c3429ce7f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -36568963356e3919e8b862e7e40ded2eae7ce187 \ No newline at end of file +8a000a8aae4d356e68acf2bc1788d2c40279522c \ No newline at end of file diff --git a/src/fkey.c b/src/fkey.c index 24930bdf4c..dbf8b0c777 100644 --- a/src/fkey.c +++ b/src/fkey.c @@ -310,7 +310,7 @@ static void fkLookupParent( if( pIdx==0 ){ /* If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY ** column of the parent table (table pTab). */ - int iReg = pFKey->aCol[0].iFrom + regData + 1; + int iReg = aiCol[0] + regData + 1; sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead); sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, iReg); sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);