mysql> show global status like 'Handler_savepoint%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
+----------------------------+-------+
2 rows in set (0.00 sec)
mysql> show global status like 'Handler_savepoint%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Handler_savepoint | 1 |
| Handler_savepoint_rollback | 1 |
+----------------------------+-------+
2 rows in set (0.00 sec)
Yeah, Handler_savepoint_rollback is constantly increasing counter and should be DERIVE.
mysql> show global status like 'Handler_ savepoint% '; ------- ------- ------- -+----- --+ ------- ------- ------- -+----- --+ savepoint_ rollback | 0 | ------- ------- ------- -+----- --+
+------
| Variable_name | Value |
+------
| Handler_savepoint | 0 |
| Handler_
+------
2 rows in set (0.00 sec)
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t1 values (1);
Query OK, 1 row affected (0.01 sec)
mysql> savepoint aaa;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t1 values (1);
Query OK, 1 row affected (0.00 sec)
mysql> rollback to savepoint aaa;
Query OK, 0 rows affected (0.00 sec)
mysql> show global status like 'Handler_ savepoint% '; ------- ------- ------- -+----- --+ ------- ------- ------- -+----- --+ savepoint_ rollback | 1 | ------- ------- ------- -+----- --+
+------
| Variable_name | Value |
+------
| Handler_savepoint | 1 |
| Handler_
+------
2 rows in set (0.00 sec)
Yeah, Handler_ savepoint_ rollback is constantly increasing counter and should be DERIVE.