FoundationDB/sql-layer — pull request #1173 by nathanlws (2014-01-20 20:14:34+00:00)
Title: Avoid Halloween transforming query for single row changes

In the obvious case, anyway.

A fairly small optimization to the recognizer that has simple reasoning: if only one row is being updated then it's not possible for the change to cause another row to be scanned.

This was motivated by the Hibernate test that updates a referenced table. That specific case doesn't actually change any of the columns, which was the genesis of #1163, but this attack is actually simpler and applies more broadly.

Note that there are significant, pre-existing issues with UPDATEs that *do not* fit this optimization. I am writing those up elsewhere.