Fix the VDBE so that it correctly handles the sequence of operations
OP_OpenEphemeral, OP_OpenDup, OP_OpenEphemeral, and OP_OpenDup in that order on the same cursor. FossilOrigin-Name: a1be6ee0188911448c064e2c25fb0ca1daad50f3d50fb49a34430bd09736b4a9
This commit is contained in:
parent
2d58b7f40f
commit
1ee02a1ce5
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sa\stypo\sin\sa\scomment.\s\sNo\scode\schanges.
|
||||
D 2020-01-17T23:27:41.622
|
||||
C Fix\sthe\sVDBE\sso\sthat\sit\scorrectly\shandles\sthe\ssequence\sof\soperations\nOP_OpenEphemeral,\sOP_OpenDup,\sOP_OpenEphemeral,\sand\sOP_OpenDup\sin\sthat\norder\son\sthe\ssame\scursor.
|
||||
D 2020-01-18T13:53:46.126
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -603,7 +603,7 @@ F src/upsert.c 2920de71b20f04fe25eb00b655d086f0ba60ea133c59d7fa3325c49838818e78
|
||||
F src/utf.c 736ff76753236ffbc8b5b939f5e0607f28aeaa7c780b3a56b419228f0a81c87b
|
||||
F src/util.c d035b09df9cecbc0e8f07c34b815acbf0d43c8adc8d2c540e3dc92eecb27855a
|
||||
F src/vacuum.c 82dcec9e7b1afa980288718ad11bc499651c722d7b9f32933c4d694d91cb6ebf
|
||||
F src/vdbe.c 35dcc7d43c2635853773d994b052061283a4e5b0e60e799cef83e410d90f3145
|
||||
F src/vdbe.c 562acbbe042b8ebff4a676870c242eaa3d3c3bf1967ed76e88f56adebd88aac5
|
||||
F src/vdbe.h defd693289c7bb8d325f109be9490c77138061211a116827da7244b6015a4934
|
||||
F src/vdbeInt.h 30d3e8b991547cdf39025e416a0a737b0416d46747af70ae058f60e2e0466fe7
|
||||
F src/vdbeapi.c 1252d80c548711e47a6d84dae88ed4e95d3fbb4e7bd0eaa1347299af7efddf02
|
||||
@ -1739,7 +1739,7 @@ F test/windowerr.test a8b752402109c15aa1c5efe1b93ccb0ce1ef84fa964ae1cd6684dd0b3c
|
||||
F test/windowfault.test 8e3b69abe0eea9595ba3940afd9c63644e11966ed8815734b67f1479a8e9891a
|
||||
F test/with1.test 386d1c1763a9d369fd08ea03145869b6313ba263e1a102df5a275007000d1b47
|
||||
F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1ab
|
||||
F test/with3.test 7de8dff2891aca0f9453463e4a2d6eb995baf137827d5596116fee53e22a4e29
|
||||
F test/with3.test 13b3336739da648a9e4dfa11bb04e73a920c97620041007c5f75d5d14084c346
|
||||
F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
|
||||
F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
|
||||
F test/without_rowid1.test 9cfb83705c506e3849fa7efc88a3c9a15f9a50bf9b1516b41757a7cef9bba8c3
|
||||
@ -1857,7 +1857,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 84f314902c48336849081c7e9fe2a52caf171b8215a1c6e80cded0700c447eb1
|
||||
R 2fb32354b475f2376d5f16975a73a479
|
||||
P 4363f69c3ad5a9859471547cab713f1acabd5fce13872cc1ddaa972d6c1dfb35
|
||||
R d839bc11e031796b84492fdd1d8db21c
|
||||
U drh
|
||||
Z fdbc0760a597e5c298156985f89293eb
|
||||
Z 98479fb559bee0ab85da5c957cd37687
|
||||
|
@ -1 +1 @@
|
||||
4363f69c3ad5a9859471547cab713f1acabd5fce13872cc1ddaa972d6c1dfb35
|
||||
a1be6ee0188911448c064e2c25fb0ca1daad50f3d50fb49a34430bd09736b4a9
|
@ -3917,15 +3917,13 @@ case OP_OpenEphemeral: {
|
||||
assert( pOp->p1>=0 );
|
||||
assert( pOp->p2>=0 );
|
||||
pCx = p->apCsr[pOp->p1];
|
||||
if( pCx ){
|
||||
if( pCx && pCx->pBtx ){
|
||||
/* If the ephermeral table is already open, erase all existing content
|
||||
** so that the table is empty again, rather than creating a new table. */
|
||||
assert( pCx->isEphemeral );
|
||||
pCx->seqCount = 0;
|
||||
pCx->cacheStatus = CACHE_STALE;
|
||||
if( pCx->pBtx ){
|
||||
rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
|
||||
}
|
||||
rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
|
||||
}else{
|
||||
pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, CURTYPE_BTREE);
|
||||
if( pCx==0 ) goto no_mem;
|
||||
|
@ -173,5 +173,29 @@ do_execsql_test 4.1 {
|
||||
);
|
||||
} {1}
|
||||
|
||||
# 2020-01-18 chrome ticket 1043236
|
||||
# Correct handling of the sequence:
|
||||
# OP_OpenEphem
|
||||
# OP_OpenDup
|
||||
# Op_OpenEphem
|
||||
# OP_OpenDup
|
||||
#
|
||||
do_execsql_test 4.2 {
|
||||
SELECT (
|
||||
WITH t1(a) AS (VALUES(1))
|
||||
SELECT (
|
||||
WITH t2(b) AS (
|
||||
WITH t3(c) AS (
|
||||
WITH t4(d) AS (VALUES('elvis'))
|
||||
SELECT t4a.d FROM t4 AS t4a JOIN t4 AS t4b LEFT JOIN t4 AS t4c
|
||||
)
|
||||
SELECT c FROM t3 WHERE a = 1
|
||||
)
|
||||
SELECT t2a.b FROM t2 AS t2a JOIN t2 AS t2x
|
||||
)
|
||||
FROM t1 GROUP BY 1
|
||||
)
|
||||
GROUP BY 1;
|
||||
} {elvis}
|
||||
|
||||
finish_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user