Delegate type_cast to injected type object in mysql

/cc @senny