fix wrong parameter order in mysql_connect
add function dispatcher
replace CQuery raw pointer with shared_ptr type