memory fixups for mysql