Does MySQLdb rollback on control-C? Maybe not.

John Nagle nagle at animats.com
Fri Sep 3 17:34:10 EDT 2010


On 9/3/2010 12:41 PM, Mike Kent wrote:
> On Sep 3, 12:22 am, John Nagle<na... at animats.com>  wrote:
>>      I would expect MySQLdb to rollback on a control-C, but it doesn't
>> seem to have done so.
>
>> Something is broken.
>
> I wouldn't expect it to, I'd expect to roll back on an exception, or
> commit if not.

    MySQL does rollback properly on connection failure or program
exit.  It turns out I had a commit on that database handle in logging
code.

				John Nagle



More information about the Python-list mailing list