I know in a lot of ancient texts, characters can be conflated, and what was one character ends up being interpreted as two, and vice-versa, or both as trope-based derivations from a previous story. I always wondered about the fact that the two prominent named female characters in gospels (IIRC) were both named Mary. Is this a coincidence or do people believe there is some literary or historical significance to this?
Mary Magdalene and Mary, the mother of Jesus are definitely two different people. It's a common name. Just in the Christian New Testament, there's also Mary, the sister of Martha. And really, the name is Miriam/Maryam/Mary--Miriam being the sister of Moses.
That said: in the Middle Ages, Mary Magalene did absorb two other characters in the Gospel narratives (but never the Virgin Mary). The legend of MM assimilated the Gospel characters of Mary Magdalene, Mary the sister of Martha (Mary of Bethany), and the sinful woman of Luke 7.
If you're interested, I talk about the evolution of the Mary Magdalene story in this earlier answer!