I've run git bisect on the https://github.com/mackyle/sqlite mirror of sqlite3 source code repository and spotted that the following commit fixes the issue : https://github.com/mackyle/sqlite/commit/ce015fb42bbb6cafdbfc9b028c2ec0626a8f3217
This applies almost on top of sqlite 3.11.0 sources:
$ patch -p1 < /tmp/tmp.patch patching file ext/rtree/rtree.c Hunk #1 succeeded at 132 (offset -1 lines). Hunk #2 succeeded at 506 (offset -113 lines). Hunk #3 succeeded at 524 (offset -113 lines). Hunk #4 succeeded at 541 (offset -113 lines). Hunk #5 succeeded at 819 (offset -116 lines). Hunk #6 succeeded at 858 (offset -116 lines). Hunk #7 succeeded at 2961 (offset -220 lines). Hunk #8 succeeded at 3002 (offset -220 lines). Hunk #9 succeeded at 3055 (offset -227 lines). Hunk #10 FAILED at 3490. 1 out of 10 hunks FAILED -- saving rejects to file ext/rtree/rtree.c.rej
The reject is $ cat ext/rtree/rtree.c.rej --- ext/rtree/rtree.c +++ ext/rtree/rtree.c @@ -3490,7 +3540,7 @@ static int rtreeInit( pRtree->zDb = (char *)&pRtree[1]; pRtree->zName = &pRtree->zDb[nDb+1]; pRtree->nDim = (u8)((argc-4)/2); - pRtree->nDim2 = argc - 4; + pRtree->nDim2 = pRtree->nDim*2; pRtree->nBytesPerCell = 8 + pRtree->nDim2*4; pRtree->eCoordType = (u8)eCoordType; memcpy(pRtree->zDb, argv[1], nDb);
The nDim2 member doesn't exist in sqlite 3.11.0
I've attached the "clean" patch derived from this.
I've run git bisect on the https:/ /github. com/mackyle/ sqlite mirror of sqlite3 source code repository and spotted that the following commit fixes the issue : /github. com/mackyle/ sqlite/ commit/ ce015fb42bbb6ca fdbfc9b028c2ec0 626a8f3217
https:/
This applies almost on top of sqlite 3.11.0 sources:
$ patch -p1 < /tmp/tmp.patch rtree.c. rej
patching file ext/rtree/rtree.c
Hunk #1 succeeded at 132 (offset -1 lines).
Hunk #2 succeeded at 506 (offset -113 lines).
Hunk #3 succeeded at 524 (offset -113 lines).
Hunk #4 succeeded at 541 (offset -113 lines).
Hunk #5 succeeded at 819 (offset -116 lines).
Hunk #6 succeeded at 858 (offset -116 lines).
Hunk #7 succeeded at 2961 (offset -220 lines).
Hunk #8 succeeded at 3002 (offset -220 lines).
Hunk #9 succeeded at 3055 (offset -227 lines).
Hunk #10 FAILED at 3490.
1 out of 10 hunks FAILED -- saving rejects to file ext/rtree/
The reject is rtree.c. rej >zDb[nDb+ 1]; >nBytesPerCell = 8 + pRtree->nDim2*4; >eCoordType = (u8)eCoordType; pRtree- >zDb, argv[1], nDb);
$ cat ext/rtree/
--- ext/rtree/rtree.c
+++ ext/rtree/rtree.c
@@ -3490,7 +3540,7 @@ static int rtreeInit(
pRtree->zDb = (char *)&pRtree[1];
pRtree->zName = &pRtree-
pRtree->nDim = (u8)((argc-4)/2);
- pRtree->nDim2 = argc - 4;
+ pRtree->nDim2 = pRtree->nDim*2;
pRtree-
pRtree-
memcpy(
The nDim2 member doesn't exist in sqlite 3.11.0
I've attached the "clean" patch derived from this.