1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

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

View File

@@ -392,7 +392,7 @@ void sqlite3Update(
** be deleted as a result of REPLACE conflict handling. Any of these
** things might disturb a cursor being used to scan through the table
** or index, causing a single-pass approach to malfunction. */
flags = WHERE_ONEPASS_DESIRED | WHERE_SEEK_TABLE;
flags = WHERE_ONEPASS_DESIRED|WHERE_SEEK_UNIQ_TABLE;
if( !pParse->nested && !pTrigger && !hasFK && !chngKey && !bReplace ){
flags |= WHERE_ONEPASS_MULTIROW;
}