[1.7.x] Fixed test failures due to refs #20420.

cfcca7ccce3dc527d16757ff6dc978e50c4a2e61 renamed connection.queries
to queries_log and this wasn't backported to stable/1.7.x.