Issue #805858 by Pancho and Steven Jones: Affected rows inconsistent across database engine.

PR for https://github.com/backdrop/backdrop-issues/issues/274.