Get access sql suffix hook #3047

Improve get_access_sql_suffix and add's a plugin hook #3047