Issue #3444060 by longwave, catch, mondrake: Implement failed database statement events in performance test query logging (cherry picked from commit 970ff6e9)