Python DB API - commit() v. execute("commit transaction")?

Jon Ribbens jon+usenet at unequivocal.eu
Sat Jun 3 07:33:09 EDT 2017


On 2017-06-02, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Jun 3, 2017 at 5:31 AM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>> I'm not saying that transactional DDL is insane (it isn't), but MyISAM
>> tables having transactions *only* for DDL is... surprising. Especially
>> when it suddenly appeared as a "feature" in between two versions. It
>> took me quite a while to work out why our database was randomly hanging.
>
> Wait, you have transactions with MyISAM now? I thought MySQL supported
> transactions with InnoDB but not MyISAM, and the reason you didn't get
> transactional DDL was that the system catalog tables are mandatorily
> MyISAM, even if all your own tables are InnoDB.

It's not so much as properly transactional as it is "the database
wedges if a transaction is still open even though MyISAM tables
aren't supposed to have transactions in the first place".

The combination of "Python-MYSQLdb suddenly turned off autocommit"
and "MySQL suddenly made transactions relevant to MyISAM" caused me
a certain amount of difficulties a while back.



More information about the Python-list mailing list