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

Chris Angelico rosuav at gmail.com
Fri Jun 2 16:48:28 EDT 2017


On Sat, Jun 3, 2017 at 5:31 AM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
> On 2017-06-02, Chris Angelico <rosuav at gmail.com> wrote:
>> On Sat, Jun 3, 2017 at 2:45 AM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>>> Bewaare - MyISAM tables have no transactions for DML but they do have
>>> transactions for DDL. Insane but true.
>>
>> Not insane; not all DBMSes have transactional DDL, and of the major
>> ones, several have only more recently added it (despite having had
>> rock-solid transactional DML for decades). It's an excellent feature
>> but not easy to implement.
>
> 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.

ChrisA



More information about the Python-list mailing list