What does Handler_commit counter mean?

Does anyone know, what exactly is the Handler_commit item in SHOW SESSION STATUS and in which occasions is incremented?

I haven’t found any details in mysql manual, it is mentioned very briefly:

[B]Quote:[/B]
The number of internal COMMIT statements.

For example, this statment increments the counter (innodb table):

SELECT COUNT(*) FROM MyTable;

Thank you, Vojtech

That statement should not increment Handler_commit. If you examine what is REALLY happening I think you will probably find that whatever you’re using to run that query is running a COMMIT right afterwards.

Baron, I’m using new connection:

mysql> select version();±-------------------+| version() |±-------------------+| 5.1.42-percona-log |±-------------------+1 row in set (0.00 sec)mysql> use tempDatabase changedmysql> create table test_innodb (col int primary key) engine=innodb;Query OK, 0 rows affected (0.05 sec)mysql> flush status; select count() from test_innodb; show status like ‘Handler_commit’;Query OK, 0 rows affected (0.00 sec)±---------+| count() |±---------+| 0 |±---------+1 row in set (0.01 sec)±---------------±------+| Variable_name | Value |±---------------±------+| Handler_commit | 1 |±---------------±------+1 row in set (0.00 sec)

I’m not seeing the same behavior on 5.0, so this might be something that changed in 5.1, or in the plugin version of InnoDB. It could have to do with changes in the storage engine API. I’m not sure what to think about this. It ought to be a no-op anyway, but I’d like to understand this more.

You are right, I see zero on 5.0.77-community.

I’ll stay tuned, thank you Baron )

I’ll put it into my TODO list, but don’t hold your breath )