This PR refactors much of the mysql collector to include more detail and consolidate overlapping queries.
Summary of Changes:
Adds the following:
schema_objects.sql: This file queries the information_schema for all objects that belong to a schema. This includes most objects such as Tables, Views, Events, Triggers and Constraints
data_types.sql: This file counts the specific types data types of each table.
table_details.sql: This file collects and aggregates details about tables
users.sql: This consolidates all of the previous queries for user aggregate information
config.sql: This exports all parameters and replaces several separate files.
Removes the following:
eventsbyschemas.sql: Consolidated into schema_objects
fkconstraints.sql: Consolidated into schema_objects
functionsbyschema.sql: Consolidated into schema_objects
triggersbyschema.sql: Consolidated into schema_objects
objectowners.sql: Consolidated into schema_objects
proceduresbyschema.sql: Consolidated into schema_objects
tablecount.sql: Consolidated into table_details
tablepartcount.sql: Consolidated into table_details
tablesbyengine.sql: Consolidated into table_details
tablesbyschema.sql: Consolidated into table_details
tablessizebyschema.sql: Consolidated into table_details
tableswithfulltextindexes.sql: Consolidated into table_details
tableswithpk.sql: Consolidated into table_details
compressedtables.sql: Consolidated into table_details
usersnoauthentication_string.sql: Consolidated into users
usersnohost.sql: Consolidated into users
usersnopassword.sql: Consolidated into users
userswithshutdownprivs.sql: Consolidated into users
datadir.sql: Consolidated into config
init.sql: Consolidated into config
log_bin.sql: Consolidated into config
version_comment.sql: Consolidated into config
version.sql: Consolidated into config
thread.sql: Consolidated into config
Modifies
engines.sql: Opt for a specific SQL statement instead of show versions(), ensuring we get the expected output on all versions.
plugins.sql: Opt for a specific SQL statement instead of show plugins(), ensuring we get the expected output on all versions.
Adds the expected PKEY field to all files
Order PKEY, DMA_SOURCE_ID, and DMA_MANUAL_ID as the first columns in all queries.
This PR refactors much of the
mysql
collector to include more detail and consolidate overlapping queries.Summary of Changes: Adds the following:
schema_objects.sql
: This file queries theinformation_schema
for all objects that belong to a schema. This includes most objects such as Tables, Views, Events, Triggers and Constraintsdata_types.sql
: This file counts the specific types data types of each table.table_details.sql
: This file collects and aggregates details about tablesusers.sql
: This consolidates all of the previous queries for user aggregate informationconfig.sql
: This exports all parameters and replaces several separate files.Removes the following:
eventsbyschemas.sql
: Consolidated intoschema_objects
fkconstraints.sql
: Consolidated intoschema_objects
functionsbyschema.sql
: Consolidated intoschema_objects
triggersbyschema.sql
: Consolidated intoschema_objects
objectowners.sql
: Consolidated intoschema_objects
proceduresbyschema.sql
: Consolidated intoschema_objects
tablecount.sql
: Consolidated intotable_details
tablepartcount.sql
: Consolidated intotable_details
tablesbyengine.sql
: Consolidated intotable_details
tablesbyschema.sql
: Consolidated intotable_details
tablessizebyschema.sql
: Consolidated intotable_details
tableswithfulltextindexes.sql
: Consolidated intotable_details
tableswithpk.sql
: Consolidated intotable_details
compressedtables.sql
: Consolidated intotable_details
usersnoauthentication_string.sql
: Consolidated intousers
usersnohost.sql
: Consolidated intousers
usersnopassword.sql
: Consolidated intousers
userswithshutdownprivs.sql
: Consolidated intousers
datadir.sql
: Consolidated intoconfig
init.sql
: Consolidated intoconfig
log_bin.sql
: Consolidated intoconfig
version_comment.sql
: Consolidated intoconfig
version.sql
: Consolidated intoconfig
thread.sql
: Consolidated intoconfig
Modifies
engines.sql
: Opt for a specific SQL statement instead ofshow versions()
, ensuring we get the expected output on all versions.plugins.sql
: Opt for a specific SQL statement instead ofshow plugins()
, ensuring we get the expected output on all versions.PKEY
field to all filesPKEY
,DMA_SOURCE_ID
, andDMA_MANUAL_ID
as the first columns in all queries.