What happens when you swallow glass?

Ok- I always see in these prison related scenes from movies and tv about inmates putting ground glass in food, or being afraid of eating ground glass.

What actually happens when you swallow ground glass? I mean, is it just painful? or is it something that would kill you? Or is this just a myth?