This article is from the Table Tennis (Ping Pong) FAQ, by ttennis@bu.edu with numerous contributions by others.
17.1 If, by mistake, the players have not changed ends when ends should
have been changed, play shall be interrupted as soon as the error
is discovered and the players shall change ends.
17.2 If, by mistake, a player serves or receives out of his turn, play
shall be interrupted and shall continue with that player serving or
receiving who, according to the sequence established at the
beginning of the match, should be server or receiver respectively
at the score that has been reached.
17.3 In any circumstances, all points scored before the discovery of an
error shall be reckoned.
 
Continue to: