Comment 6 for bug 608027

Revision history for this message
Peter Zaitsev (pz-percona) wrote : Re: [Bug 608027] Re: CPU_TIME is UserStats is broken

Oleg,

I wonder what it has to do with current bug ?

The original bug was what the time was counted on some platforms but not
others which can't be explained by totally missed code which would make it
never work

On Sun, Jan 29, 2012 at 4:05 PM, Oleg Tsarev <email address hidden>wrote:

> Vadim,
>
> In fix I did following (comment from commit):
>
> ------
> Add set_connections function (related to incomplete port from Google
> patch) and add call to send_user_stats and send_thread_stats (bug #728082,
> bug #608027). Without this call statistcs from separated thread didn't
> aggregated to global_[client|thread|user]_stats.
> ------
>
> Every thread contains STATS diff_stats structure, which collected
> information about CPU_Time/other counters after every executed query.
> Function "set_connection_stats" extract this information from thread to
> global_[client|thread|user]_stats.
>
> Port from Google patch was incomplete - set_connection_stats missed, and
> information doesn't moved from THD to HASH table.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/608027
>
> Title:
> CPU_TIME is UserStats is broken
>
> Status in Percona Server with XtraDB:
> Triaged
> Status in Percona Server 5.1 series:
> Fix Committed
> Status in Percona Server 5.5 series:
> Triaged
>
> Bug description:
> Just noticed this:
>
> mysql> select * from information_schema.user_statistics where
> user="#mysql_system#" \G
> *************************** 1. row ***************************
> USER: #mysql_system#
> TOTAL_CONNECTIONS: 1
> CONCURRENT_CONNECTIONS: 0
> CONNECTED_TIME: 446
> BUSY_TIME: 74
> CPU_TIME: 0
> BYTES_RECEIVED: 0
> BYTES_SENT: 63
> BINLOG_BYTES_WRITTEN: 0
> ROWS_FETCHED: 0
> ROWS_UPDATED: 127576
> TABLE_ROWS_READ: 4085689
> SELECT_COMMANDS: 0
> UPDATE_COMMANDS: 119127
> OTHER_COMMANDS: 89557
> COMMIT_TRANSACTIONS: 90259
> ROLLBACK_TRANSACTIONS: 0
> DENIED_CONNECTIONS: 1
> LOST_CONNECTIONS: 0
> ACCESS_DENIED: 0
> EMPTY_QUERIES: 0
> 1 row in set (0.00 sec)
> [/sql]
>
> The CPU time is 0 which does not sounds right. This is from Percona
> Server RPM on RHEL 5 64bit. Is it compiled with
> proper support ?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/percona-server/+bug/608027/+subscriptions
>

--
Peter Zaitsev, CEO, Percona Inc.
Tel: +1 888 401 3401 ext 501 Skype: peter_zaitsev
24/7 Emergency Line +1 888 401 3401 ext 911

Percona Live MySQL Conference April 10-12 Santa Clara
http://www.percona.com/live/mysql-conference-2012/