Where the open source database community meets: Use code PERCONA75 and secure your spot for Percona Live.  Register

Userstats patches with information schema support

August 4, 2008
Author
Evgeniy Firsov
Share this Post:

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.

Links:
Patch for 5.0.62
Patch for 5.1.26

0 0 votes
Article Rating
Subscribe
Notify of
guest

16 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mark Leith
Mark Leith
17 years ago

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

http://bugs.mysql.com/bug.php?id=31719

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.

Mark Callaghan
17 years ago

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

Mark Callaghan
17 years ago

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

Mark Callaghan
17 years ago

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

Vadim
Admin
17 years ago

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.

Mark Callaghan
17 years ago

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

Peter Zaitsev
Admin
17 years ago

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.

Vadim
Admin
17 years ago

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#

Baron Schwartz
17 years ago

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

http://groups.google.com/group/oursql-sources/msg/0a5ddd37670c8d9b?hl=en

Mark Leith
Mark Leith
17 years ago

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!

Matthew Kent
Matthew Kent
17 years ago

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.

http://magoazul.com/tmp/userstats-is-5.0.66a.patch

Vadim Tkachenko
Admin
17 years ago

Matthew,

What problem with test suite did you have ?

Matthew Kent
Matthew Kent
17 years ago

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

http://magoazul.com/tmp/userstats-is-5.0.66a-testsuite.patch

those 3 tests were failing.

Matthew Kent
Matthew Kent
17 years ago

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

mysql> use information_schema;
Database changed
mysql> select count(*) from table_statisticsG
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_statisticsG
*************************** 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.

Vadim Tkachenko
Admin
17 years ago

Matthew,

Thanks, will look into that.

Szym
17 years ago

Any patch to patch 🙂 or more official patch against v 5.0.67 ? Thanks

Far
Enough.

Said no pioneer ever.
MySQL, PostgreSQL, InnoDB, MariaDB, MongoDB and Kubernetes are trademarks for their respective owners.
© 2026 Percona All Rights Reserved