Userstats patches with information schema support

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

Share this post

Comments (16)

  • Mark Leith Reply

    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.

    August 4, 2008 at 5:59 am
  • Mark Callaghan Reply

    This is great. Is there a bzr patch for this? I want to port it back to the Google patch.

    August 4, 2008 at 8:13 am
  • Mark Callaghan Reply

    Funny. I just noticed the link above for 5.0.62 is a patch.

    August 4, 2008 at 8:15 am
  • Mark Callaghan Reply

    @Mark – Can someone pay for an independent legal analysis of the MySQL CLA? It is a large legal document.

    August 4, 2008 at 11:15 am
  • Vadim Reply

    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.

    August 4, 2008 at 1:04 pm
  • Mark Callaghan Reply

    @Vadim – The feature request for this claims it will be in the official release for 6.0.

    August 4, 2008 at 1:20 pm
  • peter Reply

    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.

    August 4, 2008 at 6:19 pm
  • Vadim Reply

    I understand GPL difference.

    I share the concerns about CLA with Baron, Mark Callaghan and Paul Paul McCullagh

    August 4, 2008 at 8:41 pm
  • Baron Schwartz Reply

    Actually, here’s my REAL opinion about the CLA:

    August 5, 2008 at 6:42 am
  • Mark Leith Reply

    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!

    August 7, 2008 at 3:12 am
  • Matthew Kent Reply

    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.

    August 7, 2008 at 2:32 pm
  • Vadim Reply


    What problem with test suite did you have ?

    August 7, 2008 at 2:48 pm
  • Matthew Kent Reply

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

    those 3 tests were failing.

    August 7, 2008 at 3:26 pm
  • Matthew Kent Reply

    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.

    August 7, 2008 at 3:29 pm
  • Vadim Reply


    Thanks, will look into that.

    August 7, 2008 at 3:34 pm
  • Szym Reply

    Any patch to patch ūüôā or more official patch against v 5.0.67 ? Thanks

    August 18, 2008 at 1:29 pm

Leave a Reply