A man committed adultery with a woman, and since his status as a married person was not known, he was flogged. Later, when his married status became known, he was stoned.
حدثنا محمد بن عبد الرحيم أبو يحيى البزاز أخبرنا أبو عاصم عن ابن جريج عن أبي الزبير
أن رجلا زنى بامرأة فلم يعلم بإحصانه فجلد ثم علم بإحصانه فرجم
[Daif] See the previous hadith. Bayhaqi transmitted it, 8/217, from the hadith of Abu Dawud, with this wording.