Page 1 of 1

Using InnoDB rollback as application wide undo?

Posted: Thu Oct 26, 2006 11:17 pm
by alex.barylski
So, I just enabled InnoDB (for whatever reason the MySQL default is NOT the default on Ubuntu :P )

Anyways, rollback sounds promising...and makes total sense for a CMS...what I want to know now is...is there anyway I can add a comment to *every* transaction (system supplied or user) and how can I list all changes made in a chronological order, so a user may see what changes have occured and undo them as desired/required?

Cheers :)

Posted: Fri Oct 27, 2006 1:36 am
by Weirdan
Transaction does not exist after it was committed. You're stabbing in the wrong direction.

Posted: Fri Oct 27, 2006 10:59 am
by feyd
Log them separately as say, the last query performed during the transaction.

Posted: Fri Oct 27, 2006 1:00 pm
by alex.barylski
I'm reading up on InnoDB tables as we speak, but still don't understand either of you :P

Can you elaborate a little please?

Once I COMMIT, rollback doesn't exist? So COMMIT/ROLLBACK isn't really for versioning...but rather just a single UNDO for when things go horribly wrong - like power failure, etc???

I can't keep a log of transactions attach a comment to each and display those comments, allowing a user to undo/redo certain operations???

Bummer :roll:

Posted: Fri Oct 27, 2006 1:13 pm
by feyd
Transactions are a instance-only way of being able to undo a block of queries if something fails and the data would be corrupted otherwise. Once the transaction is committed, it's gone. The server may log it separately on it's own, but that is outside of the database itself.

Posted: Fri Oct 27, 2006 2:20 pm
by alex.barylski
Thats what I thought...shoot :x