Fixed #20112 -- last_executed_query unicode decoding based on connection

For mysql/postgresql backends. I guess same situation with oracle but I cant test it