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 on 2011-11-15
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to
Fix Released
Alexey Kopytov
Fix Released
Alexey Kopytov
Fix Released
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

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.

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
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) on 2012-06-15
Changed in percona-server:
importance: Undecided → Low
status: Confirmed → Triaged

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers