autocommit in migration

Hi,

in a database independent (at least mysql/postgresql) migration I want to do a lot of inserts into a new table. I used CDbMigration::insert within a safeUp() Method for it. Mysql Innodb is very slow on my machine (~7ms per insert). It’s no big deal on Postgresql.

If I set CDbConnection::autoCommit to 0, it’s very fast on mysql.

Is it safe to do that within safeUp()? Since this should initiate a transaction, all should be ok?