Description:
The file dict0stats.cc defines two sets of symbols, for internal and external names of the tables that store persistent statistics:
#define TABLE_STATS_NAME "mysql/innodb_table_stats"
#define TABLE_STATS_NAME_PRINT "mysql.innodb_table_stats"
#define INDEX_STATS_NAME "mysql/innodb_index_stats"
#define INDEX_STATS_NAME_PRINT "mysql.innodb_index_stats"
The names with _PRINT are indented for use in diagnostic output. However, there are two messages that use the internal names (the symbols with no _PRINT suffix).
How to repeat:
See above and below.
Suggested fix:
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 533f83f..0c02ca8 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -3213,9 +3213,10 @@ dict_stats_update(
ib::info() << "Trying to use table " << table->name
<< " which has persistent statistics enabled,"
" but auto recalculation turned off and the"
- " statistics do not exist in " TABLE_STATS_NAME
- " and " INDEX_STATS_NAME ". Please either run"
- " \"ANALYZE TABLE "
+ " statistics do not exist in "
+ TABLE_STATS_NAME_PRINT
+ " and " INDEX_STATS_NAME_PRINT
+ ". Please either run \"ANALYZE TABLE "
<< table->name << ";\" manually or enable the"
" auto recalculation with \"ALTER TABLE "
<< table->name << " STATS_AUTO_RECALC=1;\"."
@@ -3230,8 +3231,8 @@ dict_stats_update(
ib::error() << "Error fetching persistent statistics"
" for table "
<< table->name
- << " from " TABLE_STATS_NAME " and "
- INDEX_STATS_NAME ": " << ut_strerr(err)
+ << " from " TABLE_STATS_NAME_PRINT " and "
+ INDEX_STATS_NAME_PRINT ": " << ut_strerr(err)
<< ". Using transient stats method instead.";
goto transient;