aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2021-07-03 02:55:47 +0000
committerdrh <>2021-07-03 02:55:47 +0000
commit5c46a7e5555fb72c94698b21ef8490083243edb0 (patch)
treeb0a6f4f9f8d3144e4aabbd25f5f861b415f2534d /src
parentdd51365408391e457b0d37d1cdf87b56622b5673 (diff)
downloadsqlite-5c46a7e5555fb72c94698b21ef8490083243edb0.tar.gz
sqlite-5c46a7e5555fb72c94698b21ef8490083243edb0.zip
In the PRAGMA foreign_key_check, ensure that sufficient registers are
allocated for the virtual machine, even if one or more foreign keys reuses the same column multiple times and has more columns than the table it is part of. [forum:/forumpost/a6b0c05277|Forum post a6b0c05277]. FossilOrigin-Name: 68db1ff9c44fa9c37690ce55ad304d4263ba6fac490063d9e08470de6c17cfe6
Diffstat (limited to 'src')
-rw-r--r--src/pragma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pragma.c b/src/pragma.c
index 84f29c2fd..4f9b8d913 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -1466,6 +1466,7 @@ void sqlite3Pragma(
sqlite3ExprCodeGetColumnOfTable(v, pTab, 0, iCol, regRow+j);
sqlite3VdbeAddOp2(v, OP_IsNull, regRow+j, addrOk); VdbeCoverage(v);
}
+ if( regRow+j>pParse->nMem ) pParse->nMem = regRow+j;
/* Generate code to query the parent index for a matching parent
** key. If a match is found, jump to addrOk. */