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



  1. Mark Leith says

    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. Vadim says

    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.

  3. says

    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.

  4. Mark Leith says

    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!

  5. Matthew Kent says

    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

Your email address will not be published. Required fields are marked *