From: Marc Alff Date: December 2 2010 8:07am Subject: bzr commit into mysql-trunk-bugfixing branch (marc.alff:3406) Bug#58172 List-Archive: http://lists.mysql.com/commits/125752 X-Bug: 58172 Message-Id: <201012020807.oB268uUQ022533@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7012948347879877146==" --===============7012948347879877146== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///Users/malff/BZR_TREE/mysql-trunk-bugfixing-58172/ based on revid:zhenxing.he@stripped 3406 Marc Alff 2010-12-02 Bug#58172 Column performance_schema.threads.processlist_time out of range Before this fix, the column processlist_time in table performance_schema.threads could receive out of range values. Some negative time was computed, because timers may have some drift and are not guaranteed to be always monotonous. This fix replaces negative time values with 0, to correct the data, and make the data fit into an unsigned column. modified: storage/perfschema/table_threads.cc === modified file 'storage/perfschema/table_threads.cc' --- a/storage/perfschema/table_threads.cc 2010-12-01 18:46:51 +0000 +++ b/storage/perfschema/table_threads.cc 2010-12-02 08:07:06 +0000 @@ -289,7 +289,11 @@ int table_threads::read_row_values(TABLE break; case 8: /* PROCESSLIST_TIME */ if (m_row.m_start_time) - set_field_ulonglong(f, my_time(0) - m_row.m_start_time); + { + time_t now= my_time(0); + ulonglong elapsed= (now > m_row.m_start_time ? now - m_row.m_start_time : 0); + set_field_ulonglong(f, elapsed); + } else f->set_null(); break; --===============7012948347879877146== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/marc.alff@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: marc.alff@stripped # target_branch: file:///Users/malff/BZR_TREE/mysql-trunk-bugfixing-\ # 58172/ # testament_sha1: 577c2551affca4f3eaeff65f52b299207c8c9669 # timestamp: 2010-12-02 09:07:12 +0100 # base_revision_id: zhenxing.he@stripped\ # iel8lvhmulyagtsv # # Begin bundle IyBCYXphYXIgcmV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zWxTCwfzakyIUJxjlFx FN1aYOSTWR5Hp6RkLgnvCLTa6OUMxnC4n3mt1IxLSVupb3qsrBWEwYgkWibWNLaeuADhy/YAYRq5 dgxM86l2pz1EI0Nac5Sn3Gz4nkM+6Sn1lzMwYMUY2SxqlKEty1E5WsNWsWTqkkTDLBKGGCQ5m4Vv Nxag29p5S690zJky1a1xKQ/rUKng4whdnCqEDgA4JxS64lVlZ7UjEo1ZB/GzJw45pcs1eDPLYYbx Wdg9lBUCnBbZiNIjYiMlpojDe5eHHnejKZ5OxE7hnmypLuMPOq1cF2e+Q50zD/aMHb6AzumXreaV xwSAsCQckWCaaVufU5ZfMTnde32mxUtM+fnVqOndk86YsRV6ZIs60aFovFmo4lYPoFgcYMTuSa8a H06R4YY+VHpRL8GXYqbpFTpmxRdSuXaFyLQ32gqa2qqrC+Q5gLbjwVH4Ito9JdmB/i7kinChIRQR XcI= --===============7012948347879877146==--