According to the Gospel of John, the Pharisees, in an attempt to discredit Jesus, brought a woman charged with adultery before him. Then they reminded Jesus that adultery was punishable by stoning under Mosaic law and challenged him to judge the woman. They were hoping to accuse him of disobeying the law by showing her mercy. Jesus thought for a moment and then replied, “He that is without sin among you, let him cast the first stone at her.”
The people around him were so convicted by their own consciences that they quickly departed. When Jesus found himself alone with the woman, he asked her who were her accusers. She replied, “No man, lord.” Jesus then said, “Neither do I condemn thee: go and sin no more.”
Did Jesus uphold the Mosaic law or not?
You’re referring to John 8:1-11.
Setting aside the fact that this was meant to be a trap, and only the woman was brought before him when the law required that both the woman and the man be punished, yes, Jesus did fulfill the Mosaic Law.
According to Deut. 19:15 it took two or three witnesses to convict a person of a crime. There being no accusers to testify against her, it would not have been legal for Jesus to condemn her.