fix bugs in mysql adapter and add dba trait