I came across this while browsing on PHP.net:

COMMIT in the last example seems to mean you can check what happens then do the command. I'm not sure where this would be useful, but I think it's worth knowing about.

How would one cancel instead of committing?

I don't see any more info.