Mutarrif narrates from al-Sha'bi (may Allah have mercy on him) that two men testified before Sayyiduna Ali (may Allah be pleased with him) against a man for theft, and Sayyiduna Ali (may Allah be pleased with him) cut off his hand. Then they brought another man and said: This is the thief, not the first one. So Sayyiduna Ali (may Allah be pleased with him) made them liable for the blood money (diyah) of the first man's hand, and said: "Had I known that you did it deliberately, I would have cut off your hands." But he did not cut off the second man's hand.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21192
Mansur narrates from al-Hasan (may Allah have mercy on him): If two men testify to a killing, then the killer is executed, and then one of the witnesses retracts, he is to be killed.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21193
Abu Husayn narrates from Judge Shurayh (may Allah have mercy on him) that a man gave testimony before him and Shurayh carried out the judgement according to it. Afterwards the man retracted, but Shurayh did not believe his statement; that is, he did not overturn the first judgement and did not accept his retraction. As for making him pay compensation for whatever was destroyed, that is as has already passed.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21194
Al-Awza'i (may Allah have mercy on him) said: I asked al-Zuhri (may Allah have mercy on him) about a man who testified before the ruler, and the ruler upheld his testimony, but later he changed his testimony.
It was asked: Is the first testimony valid or the later one? He said: Neither is acceptable.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21195