0.3.2 does not raise SQLError on failure to insert (MySQL), 0.3.1 does

Issue #397 resolved
Former user created an issue

I was debugging a problem where the begin..insert..commit /appeared/ to work just fine but nothing was showing up in the DB. The logging was cranked all the way up (echo='debug') and still nothing, no rollback. A tcpdump showed, however, that a ROLLBACK was indeed taking place. I tried backing off to 0.3.1 and the exact same client code produced an exception. Specifically it appears as though the commit..rollback in 0.3.2 appears to be broken for MySQL. This seems pretty serious.

Comments (3)

  1. Mike Bayer repo owner

    All MySQL unit tests for transactions pass, I have upgraded them to use InnoDB so that rollback() is functional, and added an additional test that attempts to guess what your problem is, which also passes (changeset:2160,changeset:2161). Please note that, as the instructions now say in huge red letters, bugs cannot be fixed without working test cases.

  2. Former user Account Deleted
    • changed status to open
    • removed status

    In this particular case, I was operating with a user that did not have insert permissions. It should not be hard to construct a unit test for which the user can connect but does not have insert permissions.

  3. Mike Bayer repo owner

    Thank you, that condition was quite important, as it revealed the issue was isolated to OperationalErrors. Creating a test case would have saved me quite a bit of time. This is fixed in changeset:2163.

  4. Log in to comment