Climaxing

So I have a question. Has any one ever felt like they had to poop as they got closer to their climax during sex? What happened? How do you avoid it?
Also has anyone ever get like they were about to climax but then it just doesn't happen-like it feels like you need to cum but you just can't?