3 ms·
MySQL is set to autocommit by default (you can check with "select @@autocommit", there are probably some other ways to check as well), then it comes to which en
by mgrouchy 17y ago
MySQL is set to autocommit by default (you can check with "select @@autocommit", there are probably some other ways to check as well), then it comes to which engine you use, many of them don't support transactions, but some like InnoDB do. So it really all depends.
in response to lincolnq below:
you are correct, if the engine does support autocommit it is turned on automatically. http://www.python.org/dev/peps/pep-0249/ http://www.python.org/dev/peps/pep-0249/
- lincolnq 17y agoMySQL may be autocommit by default, but I believe the Python DB-API spec (and therefore mysqldb) specifies to turn autocommit off when the connection is opened.