GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

What does Handler_commit counter mean?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    Quote:

    The number of internal COMMIT statements.


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

    SELECT COUNT(*) FROM `MyTable`;


    Thank you, Vojtech

  • #2
    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.

    Comment


    • #3
      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)

      Comment


      • #4
        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.

        Comment


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

          I'll stay tuned, thank you Baron )

          Comment


          • #6
            I'll put it into my TODO list, but don't hold your breath )

            Comment


            • #7
              Hello,

              Thank you for the report. I was able to investigate this issue more thoroughly and determined that it is a bug in MySQL 5.1

              I verified that the problem is not located in the XtraDB or InnoDB plugin source codes.

              I filed a bug report with MySQL:
              http://bugs.mysql.com/bug.php?id=52453

              Comment

              Working...
              X