distal-attribute
distal-attribute
distal-attribute
distal-attribute

autocommit should be disabled always by default

eos posted 1 year ago in Feature discussion

you should always be able to commit or rollback changes.

I am sure that heidisql used to have autocommit off, but now it seems to be on by default, with no way to disable it (except by hand every time you open a database which is a huge drag and I keep forgetting)

Autocommit is evil and dangerous.

ansgar posted 1 year ago

HeidiSQL never touched the autocommit variable, ever. But you can set it off via auto-started SQL script, in the advanced session settings.

kalvaro posted 1 year ago

HeidiSQL never touched the autocommit variable, ever. But you can set it off via auto-started SQL script, in the advanced session settings.

That's right. Just remember that transactions do not work in all storage engines so try not to rely a lot on this to avoid unexpected data loss:

mysql> show engines;
+--------------------+- ... -+--------------+------+------------+
| Engine             |  ...  | Transactions | XA   | Savepoints |
+--------------------+- ... -+--------------+------+------------+
| FEDERATED          |  ...  | NULL         | NULL | NULL       |
| MRG_MYISAM         |  ...  | NO           | NO   | NO         |
| MyISAM             |  ...  | NO           | NO   | NO         |
| BLACKHOLE          |  ...  | NO           | NO   | NO         |
| CSV                |  ...  | NO           | NO   | NO         |
| MEMORY             |  ...  | NO           | NO   | NO         |
| ARCHIVE            |  ...  | NO           | NO   | NO         |
| InnoDB             |  ...  | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA |  ...  | NO           | NO   | NO         |
+--------------------+- ... -+--------------+------+------------+
eos posted 1 year ago

HeidiSQL never touched the autocommit variable, ever. But you can set it off via auto-started SQL script, in the advanced session settings.

This looks like a good option, but I would like to set it globally - I have more than 30 database sessions defined - all mysql or percona with Innodb.

davide_spagnoli posted 2 weeks ago

Ansgar, please consider to add "commit" and "rollback" buttons in the UI, the lack of this feature is the main reason why we chose another product for our company. It is true that transactions don't work work with all engines, but nowadays InnoDB (or XtraDB) are the most used.

Please login to leave a reply, or register at first.