I am reviewing code by another developer. He has a commit that explicitly adds set autocommit=0
at the start of a MySQL transaction. This is causing problems for other non-transactional queries in the session.
Does adding set autocommit=0
within a transaction do anything for that transaction? I assume it doesn't, since transactions implicitly do this anyway.
[The only rationale I can come up with for this commit is perhaps the db once used MyISAM (versus the current InnoDB), and this was maybe a way to mimic transactions in the former?]