Avoid redundant table b-tree cursor seeks in UPDATE statements that use the

two-pass strategy.

FossilOrigin-Name: dc555b1039c6930f6d15355c698ff917a85e8056
This commit is contained in:
dan
2017-01-28 19:45:34 +00:00
parent 6034d47618
commit f64ece143c
7 changed files with 62 additions and 15 deletions
+19
View File
@@ -582,4 +582,23 @@ do_iterator_test 11.2 * {
} {
}
reset_db
do_execsql_test 12.1 {
CREATE TABLE t1(r INTEGER PRIMARY KEY, a, b);
CREATE INDEX i1 ON t1(a);
INSERT INTO t1 VALUES(1, 1, 1);
INSERT INTO t1 VALUES(2, 1, 2);
INSERT INTO t1 VALUES(3, 1, 3);
}
do_iterator_test 12.2 * {
UPDATE t1 SET b='one' WHERE a=1;
} {
{UPDATE t1 0 X.. {i 1 {} {} i 1} {{} {} {} {} t one}}
{UPDATE t1 0 X.. {i 2 {} {} i 2} {{} {} {} {} t one}}
{UPDATE t1 0 X.. {i 3 {} {} i 3} {{} {} {} {} t one}}
}
finish_test