Former champion Federer set a record with his 234th grand-slam match win but only after wasting two matchpoints in a third-set tiebreak and having to play a fourth set to beat Romanian Adrian Ungur.
The third-seeded Federer eventually won 6-3 6-2 6-7 6-3 on a sunny Philippe Chatrier court to pass Jimmy Connors's professional-era record, having equalled it in the first round here.
"Instead of being aggressive I let him show me what he could do," Federer said of the lost matchpoints. "He played two beautiful shots and he played very well."
In Image: Switzerland's Roger Federer returns the ball to Romania's Adrian Ungur during their second round match in the French Open tennis tournament
French Open 2012