summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-12-15 11:27:08 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2015-12-15 11:29:15 +0200
commit98c9fbfa215242f2930990a0a80b9c5642d23e58 (patch)
tree891140935e175dc15764eb6ec134bd3d6c7b07d2 /mysql-test/suite/innodb/r
parente9b4a041af5122dffd59012493c565e6e3db2664 (diff)
downloadmariadb-git-98c9fbfa215242f2930990a0a80b9c5642d23e58.tar.gz
MDEV-8297: information_schema.innodb_sys_tablestats.modified_counter doesn't change on UPDATE
Update modified-counter also if update effects non-indexed columns.
Diffstat (limited to 'mysql-test/suite/innodb/r')
-rw-r--r--mysql-test/suite/innodb/r/innodb-stats-modified-counter.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result b/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
new file mode 100644
index 00000000000..db56c6ba81a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
@@ -0,0 +1,20 @@
+set global innodb_stats_auto_recalc=off;
+CREATE TABLE t1 (i int) ENGINE=InnoDB;
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 0 0
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 2 2
+DELETE FROM t1 WHERE i = 1;
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 1 3
+UPDATE t1 SET i = 4 WHERE i = 2;
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 1 4
+DROP TABLE t1;
+set global innodb_stats_auto_recalc=default;