Strange MySQL Problem

John Nagle nagle at animats.com
Fri May 21 13:29:40 EDT 2010


Christian Heimes wrote:
> MRAB wrote:
>> I think you need to 'commit' any changes to do to the database.
> 
> Yeah, you are right.
> Also some RDBMS don't support DDL and DML statements inside one 
> transaction. You may need to commit and begin after the create table DDL.
> 
> Christian

    Er, yes.  Generally, you don't try a create on every insert transaction.
Since your create has foreign keys, it will fail if the other tables don't
already exist. So you need to have a more organized way of setting up the
database.

    InnoDB is a proper transaction database.  You must commit after insert
or the inserts will be properly rolled back and undone after
database disconnect.

					John Nagle



More information about the Python-list mailing list