Rollback if trigger crashes

Posted on 2008-11-18
Last Modified: 2012-05-05
When I insert a record, a Trigger is fired. I want to monitor this Trigger. If Trigger executed successfully, then commit else rollback. How to get the response whether the Trigger executed successfully or not?
Question by:rpkhare
    LVL 26

    Accepted Solution


    Pls follow will get an idea whether the insert+trigger has caused any errors...

    2. INSERT INTO someTable => Some trigger fired on "AFTER|BEFORE INSERT"
    3. SHOW ERRORS; or SHOW COUNT(*) ERRORS; or SELECT @@error_count;
       if @@error_count > 1 then
       end if;
    LVL 8

    Author Closing Comment

    Thanks. I'll try.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now