Bug #26410 InnoDB row operations counters wraps around at 2^32
Submitted: 15 Feb 2007 15:32 Modified: 13 May 2010 16:04
Reporter: Per Hallström Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:5.0.27 OS:Any (Any)
Assigned to: Assigned Account CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[15 Feb 2007 15:32] Per Hallström
Description:
The row operations counters in InnoDB wraps around at 2^32. 

How to repeat:
Read more than 2^32 rows from InnoDB.

Suggested fix:
Increase the storage required for counters to 8 bytes to allow higher maximum values.
[15 Feb 2007 16:18] Mark Leith
Indeed you are correct:

ulint		srv_n_rows_inserted		= 0;
ulint		srv_n_rows_updated		= 0;
ulint		srv_n_rows_deleted		= 0;
ulint		srv_n_rows_read			= 0;

Thank you for the reasonable feature request.
[15 Feb 2007 17:31] Heikki Tuuri
The counters are 64-bit in a 64-bit computer, but only 32-bit in a 32-bit computer.

5.0:
./include/univ.i:182:#define ULINTPF                    "%I64u"
./include/univ.i:186:#define ULINTPF                    "%lu"

        fprintf(file,
        "Number of rows inserted " ULINTPF
        ", updated " ULINTPF ", deleted " ULINTPF ", read " ULINTPF "\n",
                        srv_n_rows_inserted,
                        srv_n_rows_updated,
                        srv_n_rows_deleted,
                        srv_n_rows_read);