Advertisement

07.18.2008 at 06:11PM PDT, ID: 23578595
[x]
Attachment Details

Examples and Explanation of Transaction and Rollback for MySQL 5.0

Asked by SStory in MySQL

Tags: mysql 5 transaction commit rollback examples

It sounds crazy, but I can't find any examples of how to know when to rollback in a transaction.
It is obvious that you do ROLLBACK to do it, but when?

I have some INSERTS, UPDATES, etc. that need to take place in a transaction.  This is MySQL 5.0 inside of a Stored Procedure or Stored Function.  What do I do to test for failure on these and rollback?  Please provide examples.

ThanksStart Free Trial
 
Loading Advertisement...
 
[+][-]07.19.2008 at 12:36AM PDT, ID: 22041705

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 12:41AM PDT, ID: 22041719

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.21.2008 at 12:42PM PDT, ID: 22053678

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MySQL
Tags: mysql 5 transaction commit rollback examples
Sign Up Now!
Solution Provided By: SStory
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906