EmergencyEMERGENCY? Get 24/7 Help Now!

Userstats patches with information schema support

 | August 4, 2008 |  Posted In: Percona Software


Recently, we added information schema support to Google’s userstats patch.

There are three information schema tables added: user_statistics, table_statistics, index_statistics.

One can now use select * from information_schema.user_statistics along with show user_statistics.

Patch for 5.0.62
Patch for 5.1.26

Evgeniy Firsov

Evgeniy is a former Percona employee. Evgeniy used to be a member of Percona's expert software engineering team. He has helped our team build the magic behind the curtain for some of Silicon Valley's most innovative startups.


  • Could you guys update Mark’s bug with these please?


    Would you also be interested in having this included in the main line server, and be willing to sign a CLA for this? I’d love to see these included myself, and am willing to advocate them internally.

  • 2 Mark Leith,

    I personally would like to see it included in MySQL, but CLA seems problematic.
    Our patch is GPL and based on Mark Callaghan’s patch, which also GPL. I think that enough to include in GPL version of MySQL.

  • Vadim – there is no problem for US to release it as GPL however this will not be enough for inclusion in stock MySQL. In Drizzle… it should be enough.

  • Peter
    I understand GPL difference.

    I share the concerns about CLA with Baron, Mark Callaghan and Paul Paul McCullagh http://groups.google.com/group/oursql-sources/browse_thread/thread/1662e1d4d4fadc71?hl=en#

  • Hey I’m just a lowly Support guy, it seems that you guys are having a good discussion about this with Jay however, and he’s probably the best person to be dealing with on the issues of community contributor agreements.

    However, from *my* perspective, I would love to see this work included within MySQL, I think it would benefit a lot of people, and deserves to be distributed to the masses rather than the few.

    I’ve raised some more awareness internally for these patches however, and people are interested in them. I hope that we can all come to some better agreement on how to include this (and other) work!

  • If anyone needs it I’ve rediffed this against 5.0.66a (bzr revno 2631.4.4) and included 3 more minor patches to the test suite .result files so the build cleanly passes the test suite. No code changes at all.


  • Hi Vadim, I’ve broken out the test suite stuff here


    those 3 tests were failing.

  • also noticing a funny parser issue trying to query the unquoted table name

    mysql> use information_schema;
    Database changed
    mysql> select count(*) from table_statistics\G
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax to use near
    ‘table_statistics’ at line 1
    mysql> select count(*) from information_schema.table_statistics\G
    *************************** 1. row ***************************
    count(*): 269
    1 row in set (0.00 sec)

    mysql> select count(*) from `table_statistics`\G
    *************************** 1. row ***************************
    count(*): 269
    1 row in set (0.00 sec)

    other than that it works great. thanks to all who contributed.

Leave a Reply