(Sandomor) some small fixes for mysql adapter