Sulaiman bin Yasar (may Allah have mercy on him) swore an oath regarding a woman that if he married her, she would be divorced. And when he married her, Umar bin Abdul Aziz (may Allah have mercy on him) investigated and upheld the marriage.
Hadith Referenceسنن سعید بن منصور / كتاب النكاح / 2216