Mahavamsa refers to three visits by the Buddha to Sri Lanka. Is this historically correct? Did the Buddha ever visit Sri Lanka?
That question cannot be answered with any degree of certainty, as there are abselutely no certain facts about the Buddha. It's not even certain that he is a historical figure. Even the years of his (alleged) birth and death are disputed by several hundred years (560 - 480 b.c. or 623 – 543 b.c. or 958 – 878 b.c.), and the legend was problably first written 200 or so years b.c.
So in short: Nobody knows for sure.