PCT-671: Test to cover the problem that explain doesn't work when db is specified
PCT-671: Fix for queries that are bound to specific db