[Database] Log transaction mismatch errors to the DB log.

Change-Id: Ic681cb98e13d7769b849ddc132b71596b2b25abe
(cherry picked from commit 48dff3e3a90d09d31162bda078f0cb126b35ef65)