Skip to content

Commit 6a3fbfd

Browse files
committed
MDEV-14804 innodb.update_time occasionally fails
Let simplify the test. The update_time is stored in the table metadata (dict_table_t); it has nothing to do with buffer pool page eviction or replacement.
1 parent 40c2460 commit 6a3fbfd

File tree

2 files changed

+4
-42
lines changed

2 files changed

+4
-42
lines changed

mysql-test/suite/innodb/r/update_time.result

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Test that INFORMATION_SCHEMA.TABLES.UPDATE_TIME is filled
33
# correctly for InnoDB tables.
44
#
5-
CREATE TABLE t (a INT) ENGINE=INNODB;
5+
CREATE TABLE t (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
66
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
77
update_time
88
NULL
@@ -19,24 +19,9 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
1919
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
2020
COUNT(*)
2121
1
22-
CREATE TEMPORARY TABLE big (a TEXT) ENGINE=INNODB;
23-
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
24-
WHERE table_name = '`test`.`t`';
25-
COUNT(*)
26-
1
27-
INSERT INTO big SELECT REPEAT('a', 1024) FROM seq_1_to_10240;
28-
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
29-
WHERE table_name = '`test`.`t`';
30-
COUNT(*)
31-
0
32-
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
33-
AND update_time IS NOT NULL;
34-
COUNT(*)
35-
1
36-
DROP TEMPORARY TABLE big;
3722
# Test the behavior after restart with a prepared XA transaction
3823
XA START 'xatrx';
39-
INSERT INTO t VALUES (5);
24+
DELETE FROM t;
4025
XA END 'xatrx';
4126
XA PREPARE 'xatrx';
4227
CONNECT con1,localhost,root,,;

mysql-test/suite/innodb/t/update_time.test

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
-- echo #
66

77
-- source include/have_innodb.inc
8-
-- source include/have_innodb_max_16k.inc
98
# restart does not work with embedded
109
-- source include/not_embedded.inc
11-
# This test is slow on buildbot.
12-
--source include/big_test.inc
13-
--source include/have_sequence.inc
1410

15-
CREATE TABLE t (a INT) ENGINE=INNODB;
11+
CREATE TABLE t (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
1612

1713
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
1814

@@ -28,29 +24,10 @@ AND update_time IS NOT NULL;
2824
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
2925
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
3026

31-
CREATE TEMPORARY TABLE big (a TEXT) ENGINE=INNODB;
32-
33-
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
34-
WHERE table_name = '`test`.`t`';
35-
36-
# evict table 't' by inserting as much data as the BP size itself
37-
INSERT INTO big SELECT REPEAT('a', 1024) FROM seq_1_to_10240;
38-
39-
# confirm that all pages for table 't' have been evicted
40-
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
41-
WHERE table_name = '`test`.`t`';
42-
43-
# The result from this query will change once update_time becomes persistent
44-
# (WL#6917).
45-
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
46-
AND update_time IS NOT NULL;
47-
48-
DROP TEMPORARY TABLE big;
49-
5027
-- echo # Test the behavior after restart with a prepared XA transaction
5128

5229
XA START 'xatrx';
53-
INSERT INTO t VALUES (5);
30+
DELETE FROM t;
5431
XA END 'xatrx';
5532
XA PREPARE 'xatrx';
5633

0 commit comments

Comments
 (0)