Performance Schema Statement Digest Generation Is Broken With ALTER PARTITION (Doc ID 1984233.1)

Last updated on DECEMBER 26, 2016

Applies to:

MySQL Server - Version 5.6 and later
Information in this document applies to any platform.

Symptoms

Performance Schema statement digest generation is broken with ALTER PARTITION.

ALTER PARTITION statements generate more statement digests than they should.

mysql> CREATE TABLE 'digest_partition_test' (
-> 'id' int NOT NULL,
-> 'end_time' datetime NOT NULL,
-> PRIMARY KEY ('id','end_time')
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
-> /*!50100 PARTITION BY RANGE (TO_DAYS(end_time))
-> (PARTITION invalid_dates VALUES LESS THAN (0) ENGINE = InnoDB,
-> PARTITION day_20150201 VALUES LESS THAN (735996) ENGINE = InnoDB,
-> PARTITION day_20150202 VALUES LESS THAN (735997) ENGINE = InnoDB,
-> PARTITION day_20150203 VALUES LESS THAN (735998) ENGINE = InnoDB,
-> PARTITION day_20150204 VALUES LESS THAN (735999) ENGINE = InnoDB,
-> PARTITION day_20150205 VALUES LESS THAN (736000) ENGINE = InnoDB,
-> PARTITION day_20150206 VALUES LESS THAN (736001) ENGINE = InnoDB,
-> PARTITION day_20150207 VALUES LESS THAN (736002) ENGINE = InnoDB,
-> PARTITION day_20150208 VALUES LESS THAN (736003) ENGINE = InnoDB,
-> PARTITION day_20150209 VALUES LESS THAN (736004) ENGINE = InnoDB,
-> PARTITION day_20150210 VALUES LESS THAN (736005) ENGINE = InnoDB,
-> PARTITION day_20150211 VALUES LESS THAN (736006) ENGINE = InnoDB,
-> PARTITION day_20150212 VALUES LESS THAN (736007) ENGINE = InnoDB,
-> PARTITION day_20150213 VALUES LESS THAN (736008) ENGINE = InnoDB,
-> PARTITION day_20150214 VALUES LESS THAN (736009) ENGINE = InnoDB,
-> PARTITION max VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;
Query OK, 0 rows affected (2.41 sec)
mysql> UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements%';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 4 Changed: 2 Warnings: 0
mysql 5.6 > ALTER TABLE digest_partition_test DROP PARTITION day_20150201;
Query OK, 0 rows affected (0.44 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql 5.6 > ALTER TABLE digest_partition_test DROP PARTITION day_20150202;
Query OK, 0 rows affected (0.38 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql 5.6 > SELECT SQL_TEXT,DIGEST,DIGEST_TEXT FROM performance_schema.events_statements_history;
+----------------------------------------------------------------------------------------------+----------------------------------+--------------------------------------------------------------------------------+
| SQL_TEXT | DIGEST | DIGEST_TEXT |
+----------------------------------------------------------------------------------------------+----------------------------------+--------------------------------------------------------------------------------+
| UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements%' | b8e52ce9f72eff66025a0ae4876e9696 | UPDATE performance_schema . setup_consumers SET ENABLED = ? WHERE NAME LIKE ? |
| ALTER TABLE digest_partition_test DROP PARTITION day_20150201 | c51621124025ea4c9cf819138da6ccf5 | ALTER TABLE digest_partition_test DROP PARTITION day_20150201 |
| ALTER TABLE digest_partition_test DROP PARTITION day_20150202 | 787acb4ab613d4dc30e47b04e2a74c2d | ALTER TABLE digest_partition_test DROP PARTITION day_20150202 |
+----------------------------------------------------------------------------------------------+----------------------------------+--------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms