Highly verbose update statistics messages with UNIV_DEBUG on
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Low
|
Unassigned | |||
5.5 |
Triaged
|
Low
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
With UNIV_DEBUG on in percona server, stderr is spammed with hundreds of messages like
"InnoDB: DEBUG: update_statistics for <some-table>"
It is easy to lose other important messages with this.
It is better to use DBUG_PRINT for this than the current fprintf to stderr which it currently does.
=======
=== modified file 'Percona-
--- Percona-
+++ Percona-
@@ -4680,6 +4680,7 @@
ibool sync) /*!< in: TRUE if must update SYS_STATS */
{
+ DBUG_ENTER(
ulint sum_of_index_sizes = 0;
@@ -4692,7 +4693,7 @@
- return;
+ DBUG_VOID_RETURN;
}
if (srv_use_
@@ -4702,8 +4703,8 @@
if (dict_reload_
#ifdef UNIV_DEBUG
- fprintf(stderr, "InnoDB: DEBUG: reload_statistics succeeded for %s.\n",
- table->name);
+ DBUG_PRINT("info", ("InnoDB: DEBUG: reload_statistics succeeded for %s.\n",
+ table->name));
#endif
}
@@ -4711,8 +4712,8 @@
}
#ifdef UNIV_DEBUG
- fprintf(stderr, "InnoDB: DEBUG: update_statistics for %s.\n",
- table->name);
+ DBUG_PRINT("info", ("InnoDB: DEBUG: update_statistics for %s.\n",
+ table->name));
#endif
@@ -4724,14 +4725,14 @@
if (index == NULL) {
/* Table definition is corrupt */
- return;
+ DBUG_VOID_RETURN;
}
if (only_calc_
- return;
+ DBUG_VOID_RETURN;
}
do {
@@ -4745,7 +4746,7 @@
- return;
+ DBUG_VOID_RETURN;
===================
Yes, the update_statistic messages are annoying. However, DBUG_* macros are not available in InnoDB. We can just remove the message, it doesn't make any sense.