Toad World® Forums

Toad COMMIT/ROLLBACK

It looks to me like Toad’s parser doesn’t fully support COMMIT or ROLLBACK in the Editor window.

If I do this:

COMMIT COMMENT “my comment”

and then press F9, Toad will send “COMMIT”

This also comes into play with 2PC FORCE commands like

COMMIT FORCE ‘12.3.4567’

You can get around it by wrapping the commands in an anonymous block, but that seems kind of silly

BEGIN COMMIT FORCE ‘12.3.4567’; END;

Is this a hole, a bug or am I doing something wrong?

I wasn’t playing with distributed transaction in that way, but can say if SQL*Plus understand all, than problem is in Toad Editor…and have no idea if this (because small number of occurrences, or other non so visible reasons) would ever become in focus of Dell Toad’s development.

Does any one know why this happens?

Is it just simple pre-parsing on Toad’s part? Is it looking for the keywords “commit” or “rollback” and then ignoring the rest of the text or is it something larger?

When a commit/rollback is identified we don’t actually send the statement as you have it typed. We have global routines to perform these actions that are called instead. This allows us to perform other tasks like keeping sessions spawned by threaded query execution and the parent session in sync, etc. There’s some room for improvement here. I’m opening a bug for it now.