Revert escape_and_execute_sql helper