Question

Most databases provide the standardized INFORMATION_SCHEMA, however most also provide something else,

Does MySQL expose anything other than INFORMATION_SCHEMA? Specifically, the question was inspired by trying to find if there is a table that is responsible for internal function resolution, like pg_catalog.pg_proc which tells me for instance all the GIS functions my database has. If that was in MySQL I could address this comment. But, that aside, I just want to know if there anything more than INFORMATION_SCHEMA. That is the question.

Was it helpful?

Solution

It funny you asked this. Over 7 years ago (Jul 11, 2011), I answered the post What is the point of the TABLE_CATALOG column in INFORMATION_SCHEMA.TABLES?.

All I mention there is MySQL trying to be SQL-92 compatible, while PostgreSQL does make actual use of the information_schema (it being localized to whatever database you connected, or as I say in the post "The collapse is automatic").

Due to its open storage engine infrastructure, MySQL's exposure of functions allows for installing your own. For example, in the docs you have this:

mysql> CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
mysql> CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
mysql> CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
mysql> CREATE FUNCTION sequence RETURNS INTEGER SONAME 'udf_example.so';
mysql> CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
mysql> CREATE FUNCTION reverse_lookup
    ->        RETURNS STRING SONAME 'udf_example.so';
mysql> CREATE AGGREGATE FUNCTION avgcost
    ->        RETURNS REAL SONAME 'udf_example.so';

I have seen statements like these when installing Percona Server, and Percona supplies three commands to run (like these) to expose parts of Percona Toolkit.

Anyway, going back to your actual question: INFORMATION_SCHEMA gives you nothing than what you already know. Everything else is pluggable.

OTHER TIPS

All mysql functions are compiled directly into the code and aren't exposed.

For plugins, there's information schema/mysql.plugins, but nothing for internals functions.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top