summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2020-11-09 19:21:07 +1100
committerDaniel Black <daniel@mariadb.org>2020-12-16 08:18:19 +1100
commit2c4761ccc1980421103ed1c82aff8cf2907d962b (patch)
tree875d2e90d83551765cc4d2e281cc7ed54f3762fd
parentdc62a67ed3e7d5dcfb125f3e718adff40c17f764 (diff)
downloadmariadb-git-2c4761ccc1980421103ed1c82aff8cf2907d962b.tar.gz
MDEV-24172: innodb stats table last_update is TIMESTAMP
The last_updated column of innodb_table_stats and innodb_index_stats hasn't been DATA_FIXBINARY for many years. Innodb represents TIMESTAMP as INT of length 4. Let's test it with this and stop hiding the result in mysql_upgrade test. Reviewer: Marko
-rw-r--r--mysql-test/r/mysql_upgrade.result2
-rw-r--r--mysql-test/t/mysql_upgrade.test2
-rw-r--r--storage/innobase/dict/dict0stats.cc8
3 files changed, 4 insertions, 8 deletions
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
index b6fb56a63e0..a3e88765554 100644
--- a/mysql-test/r/mysql_upgrade.result
+++ b/mysql-test/r/mysql_upgrade.result
@@ -476,8 +476,6 @@ even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@loca
DROP USER very_long_user_name_number_1, very_long_user_name_number_2, even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost;
DROP PROCEDURE test.pr;
use test;
-call mtr.add_suppression('Column last_update in table `mysql`.`innodb_table_stats` is INT NOT NULL but should be');
-alter table mysql.innodb_table_stats modify last_update int not null;
create table extralongname_extralongname_extralongname_extralongname_ext (
id int(10) unsigned not null,
created_date date not null,
diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test
index 5dad8702fc5..a6702f91aa6 100644
--- a/mysql-test/t/mysql_upgrade.test
+++ b/mysql-test/t/mysql_upgrade.test
@@ -173,8 +173,6 @@ DROP PROCEDURE test.pr;
# MDEV-13274 mysql_upgrade fails if dbname+tablename+partioname > 64 chars
#
use test;
-call mtr.add_suppression('Column last_update in table `mysql`.`innodb_table_stats` is INT NOT NULL but should be');
-alter table mysql.innodb_table_stats modify last_update int not null;
create table extralongname_extralongname_extralongname_extralongname_ext (
id int(10) unsigned not null,
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index e72a86500a6..1611703c2e9 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -178,8 +178,8 @@ dict_stats_persistent_storage_check(
{"table_name", DATA_VARMYSQL,
DATA_NOT_NULL, 597},
- {"last_update", DATA_FIXBINARY,
- DATA_NOT_NULL, 4},
+ {"last_update", DATA_INT,
+ DATA_NOT_NULL | DATA_UNSIGNED, 4},
{"n_rows", DATA_INT,
DATA_NOT_NULL | DATA_UNSIGNED, 8},
@@ -209,8 +209,8 @@ dict_stats_persistent_storage_check(
{"index_name", DATA_VARMYSQL,
DATA_NOT_NULL, 192},
- {"last_update", DATA_FIXBINARY,
- DATA_NOT_NULL, 4},
+ {"last_update", DATA_INT,
+ DATA_NOT_NULL | DATA_UNSIGNED, 4},
{"stat_name", DATA_VARMYSQL,
DATA_NOT_NULL, 64*3},