Bad food or bad mayonnaise doesn't actually cause food poisoning but instead the bacteria that grows in the mayonnaise and other food is what actually leads to the food poisoning.
So unless the mayonnaise has gotten bacteria in it that causes the food poisoning then you won't get the food poisoning.
But eating old mayonnaise that has spoiled could lead to you getting food poisoning so if the mayo is bad then you should throw it out and not risk getting sick.
Mayonnaise will last between 2 to 3 months when you keep the opened jar of mayonnaise closed and in the refrigerator.
If the mayonnaise hasn't been opened then the jar of mayonnaise should last up to 6 months before going bad.
When the mayonnaise goes bad it will usually have a rotten egg odor or an acidic, or putrid smell to it.
Bad mayonnaise will also likely have some mold growth, mold spores etc as well as an off taste and a change of color, like darker shade of white or brownish yellow.
If the mayonnaise smells bad or tastes bad then you should throw it out because it could give you a stomach ache or possible food poisoning.
Although food poisoning is not very serious in most cases it can be deadly so if in doubt just throw the old mayonnaise out.