added afmysql_dd_insert_fail_handler function