Messi appeared in his 506th league match and has moved within just eight games of Xavi's overall record for the club of 767 games in all competitions.