Using innodb_use_sys_stats_table=1 leads to warning " failed to store 2 stats entries of db/table/field to SYS_STATS system table"

Bug #890623 reported by Olivier Doucet
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Alexey Kopytov
5.1
Fix Released
Medium
Alexey Kopytov
5.5
Fix Released
Medium
Alexey Kopytov

Bug Description

using version 5.1.51-percona-11.5 (innodb version 1.0.12-12.1)

I added "innodb_use_sys_stats_table=1" in my config file and restarted mysqld process.
My log are now filled with tons of message like this :

InnoDB: Warning: failed to store 2 stats entries of XXX/YYY/id to SYS_STATS system table.

One message is printed for each field of each table of each database loaded.

select count(*) from information_schema.innodb_sys_stats
=> 0

I would be glad to provide more information if needed. Please let me know what you need.

Related branches

Revision history for this message
Olivier Doucet (odoucet) wrote :

Running "ANALYZE TABLE" on each table fixed the issue. I'm not sure this is default behaviour.
Also, if CREATE TABLE is run when innodb_use_sys_stats_table=1 there's no need to run it.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

That warning is generated when trying to update the SYS_STATS table, but the corresponding row does not exist yet. SYS_STAT entries are created on ANALYZE TABLE, that's why it fixes the issue.

So the warnings are safe to ignore. But they should be removed anyway. They are basically supposed to indicate a "cache miss" event, there's no point to flood the error log with them.

Changed in percona-server:
status: New → Confirmed
Revision history for this message
Olivier Doucet (odoucet) wrote :

Quick note about how to 'fix' this bug :
run ANALYZE TABLE on each table on the server by executing "mysqlcheck --analyze --all-databases -v -uroot -p"
(user provided must view all databases / tables).

Stewart Smith (stewart)
Changed in percona-server:
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1224

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.