mirror of
https://github.com/MariaDB/server.git
synced 2025-11-24 06:01:25 +03:00
The original code comes, as far as I know, from Google (Mark Callaghan's team) with additional work from Percona, Ourdelta and Weldon Whipple. This code provides the same functionallity, but with a lot of changes to make it faster and better fit the MariaDB infrastucture. Added new status variables: - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_sent, Rows_read Added new variable / startup option 'userstat' to control if user statistics should be enabled or not Added my_getcputime(); Returns cpu time used by this thread. New FLUSH commands: - FLUSH SLOW QUERY LOG - FLUSH TABLE_STATISTICS - FLUSH INDEX_STATISTICS - FLUSH USER_STATISTICS - FLUSH CLIENT_STATISTICS New SHOW commands: - SHOW CLIENT_STATISTICS - SHOW USER_STATISTICS - SHOW TABLE_STATISTICS - SHOW INDEX_STATISTICS New Information schemas: - CLIENT_STATISTICS - USER_STATISTICS - INDEX_STATISTICS - TABLE_STATISTICS Added support for all new flush commands to mysqladmin Added handler::ha_... wrappers for all handler read calls to do statistics counting - Changed all code to use new ha_... calls - Count number of read rows, changed rows and rows read trough an index Added counting of number of bytes sent to binary log (status variable Binlog_bytes_written) Added counting of access denied errors (status variable Access_denied_erors) Bugs fixed: - Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long - CLOCK_GETTIME was not propely working on Linuxm client/mysqladmin.cc: Added support for all new flush commmands and some common combinations: flush-slow-log flush-table-statistics flush-index-statistics flush-user-statistics flush-client-statistics flush-all-status flush-all-statistics configure.in: Added checking if clock_gettime needs the librt. (Fixes Bug #37639 clock_gettime is never used/enabled in Linux/Unix) include/my_sys.h: Added my_getcputime() include/mysql_com.h: Added LIST_PROCESS_HOST_LEN & new REFRESH target defines mysql-test/r/information_schema.result: New information schema tables added mysql-test/r/information_schema_all_engines.result: New information schema tables added mysql-test/r/information_schema_db.result: New information schema tables added mysql-test/r/log_slow.result: Added testing that flosh slow query logs is accepted mysql-test/r/status_user.result: Basic testing of user, client, table and index statistics mysql-test/t/log_slow.test: Added testing that flosh slow query logs is accepted mysql-test/t/status_user-master.opt: Ensure that we get a fresh restart before running status_user.test mysql-test/t/status_user.test: Basic testing of user, client, table and index statistics mysys/my_getsystime.c: Added my_getcputime() Returns cpu time used by this thread. sql/authors.h: Updated authors to have core and original MySQL developers first. sql/event_data_objects.cc: Updated call to mysql_reset_thd_for_next_command() sql/event_db_repository.cc: Changed to use new ha_... calls sql/filesort.cc: Changed to use new ha_... calls sql/ha_partition.cc: Changed to use new ha_... calls Fixed comment syntax sql/handler.cc: Changed to use new ha_... calls Reset table statistics Added code to update global table and index status Added counting of rows changed sql/handler.h: Added table and index statistics variables Added function reset_statistics() Added handler::ha_... wrappers for all handler read calls to do statistics counting Protected all normal read calls to ensure we use the new calls in the server. Made ha_partition a friend class so that partition code can call the old read functions sql/item_subselect.cc: Changed to use new ha_... calls sql/lex.h: Added keywords for new information schema tables and flush commands sql/log.cc: Added flush_slow_log() Added counting of number of bytes sent to binary log Removed not needed test of thd (It's used before, so it's safe to use) Added THD object to MYSQL_BIN_LOG::write_cache() to simplify statistics counting sql/log.h: Added new parameter to write_cache() Added flush_slow_log() functions. sql/log_event.cc: Updated call to mysql_reset_thd_for_next_command() Changed to use new ha_... calls sql/log_event_old.cc: Updated call to mysql_reset_thd_for_next_command() Changed to use new ha_... calls sql/mysql_priv.h: Updated call to mysql_reset_thd_for_next_command() Added new statistics functions and variables needed by these. sql/mysqld.cc: Added new statistics variables and structures to handle these Added new status variables: - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_set, Rows_read Added new option 'userstat' to control if user statistics should be enabled or not sql/opt_range.cc: Changed to use new ha_... calls sql/opt_range.h: Changed to use new ha_... calls sql/opt_sum.cc: Changed to use new ha_... calls sql/records.cc: Changed to use new ha_... calls sql/set_var.cc: Added variable 'userstat' sql/sp.cc: Changed to use new ha_... calls sql/sql_acl.cc: Changed to use new ha_... calls Added counting of access_denied_errors sql/sql_base.cc: Added call to statistics functions sql/sql_class.cc: Added usage of org_status_var, to store status variables at start of command Added functions THD::update_stats(), THD::update_all_stats() Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long sql/sql_class.h: Added new status variables to status_var Moved variables that was not ulong in status_var last. Added variables to THD for storing temporary values during statistics counting sql/sql_connect.cc: Variables and functions to calculate user and client statistics Added counting of access_denied_errors and lost_connections sql/sql_cursor.cc: Changed to use new ha_... calls sql/sql_handler.cc: Changed to use new ha_... calls sql/sql_help.cc: Changed to use new ha_... calls sql/sql_insert.cc: Changed to use new ha_... calls sql/sql_lex.h: Added SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS, SQLCOM_SHOW_CLIENT_STATS sql/sql_parse.cc: Added handling of: - SHOW CLIENT_STATISTICS - SHOW USER_STATISTICS - SHOW TABLE_STATISTICS - SHOW INDEX_STATISTICS Added handling of new FLUSH commands: - FLUSH SLOW QUERY LOGS - FLUSH TABLE_STATISTICS - FLUSH INDEX_STATISTICS - FLUSH USER_STATISTICS - FLUSH CLIENT_STATISTICS Added THD parameter to mysql_reset_thd_for_next_command() Added initialization and calls to user statistics functions Added increment of statistics variables empty_queries, rows_sent and access_denied_errors. Added counting of cpu time per query sql/sql_plugin.cc: Changed to use new ha_... calls sql/sql_prepare.cc: Updated call to mysql_reset_thd_for_next_command() sql/sql_select.cc: Changed to use new ha_... calls Indentation changes sql/sql_servers.cc: Changed to use new ha_... calls sql/sql_show.cc: Added counting of access denied errors Added function for new information schema tables: - CLIENT_STATISTICS - USER_STATISTICS - INDEX_STATISTICS - TABLE_STATISTICS Changed to use new ha_... calls sql/sql_table.cc: Changed to use new ha_... calls sql/sql_udf.cc: Changed to use new ha_... calls sql/sql_update.cc: Changed to use new ha_... calls sql/sql_yacc.yy: Add new show and flush commands sql/structs.h: Add name_length to KEY to avoid some strlen Added cache_name to KEY for fast storage of keyvalue in cache Added structs USER_STATS, TABLE_STATS, INDEX_STATS Added function prototypes for statistics functions sql/table.cc: Store db+table+index name into keyinfo->cache_name sql/table.h: Added new information schema tables sql/tztime.cc: Changed to use new ha_... calls
357 lines
12 KiB
Plaintext
357 lines
12 KiB
Plaintext
use INFORMATION_SCHEMA;
|
|
show tables;
|
|
Tables_in_information_schema
|
|
CHARACTER_SETS
|
|
CLIENT_STATISTICS
|
|
COLLATIONS
|
|
COLLATION_CHARACTER_SET_APPLICABILITY
|
|
COLUMNS
|
|
COLUMN_PRIVILEGES
|
|
ENGINES
|
|
EVENTS
|
|
FILES
|
|
GLOBAL_STATUS
|
|
GLOBAL_VARIABLES
|
|
INDEX_STATISTICS
|
|
KEY_COLUMN_USAGE
|
|
PARTITIONS
|
|
PLUGINS
|
|
PROCESSLIST
|
|
PROFILING
|
|
REFERENTIAL_CONSTRAINTS
|
|
ROUTINES
|
|
SCHEMATA
|
|
SCHEMA_PRIVILEGES
|
|
SESSION_STATUS
|
|
SESSION_VARIABLES
|
|
STATISTICS
|
|
TABLES
|
|
TABLE_CONSTRAINTS
|
|
TABLE_PRIVILEGES
|
|
TABLE_STATISTICS
|
|
TRIGGERS
|
|
USER_PRIVILEGES
|
|
USER_STATISTICS
|
|
VIEWS
|
|
INNODB_BUFFER_POOL_PAGES
|
|
PBXT_STATISTICS
|
|
INNODB_CMP
|
|
INNODB_RSEG
|
|
XTRADB_ENHANCEMENTS
|
|
INNODB_BUFFER_POOL_PAGES_INDEX
|
|
INNODB_INDEX_STATS
|
|
INNODB_TRX
|
|
INNODB_CMP_RESET
|
|
INNODB_LOCK_WAITS
|
|
INNODB_CMPMEM_RESET
|
|
INNODB_LOCKS
|
|
INNODB_CMPMEM
|
|
INNODB_TABLE_STATS
|
|
INNODB_BUFFER_POOL_PAGES_BLOB
|
|
SELECT t.table_name, c1.column_name
|
|
FROM information_schema.tables t
|
|
INNER JOIN
|
|
information_schema.columns c1
|
|
ON t.table_schema = c1.table_schema AND
|
|
t.table_name = c1.table_name
|
|
WHERE t.table_schema = 'information_schema' AND
|
|
c1.ordinal_position =
|
|
( SELECT COALESCE(MIN(c2.ordinal_position),1)
|
|
FROM information_schema.columns c2
|
|
WHERE c2.table_schema = t.table_schema AND
|
|
c2.table_name = t.table_name AND
|
|
c2.column_name LIKE '%SCHEMA%'
|
|
);
|
|
table_name column_name
|
|
CHARACTER_SETS CHARACTER_SET_NAME
|
|
CLIENT_STATISTICS CLIENT
|
|
COLLATIONS COLLATION_NAME
|
|
COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
|
|
COLUMNS TABLE_SCHEMA
|
|
COLUMN_PRIVILEGES TABLE_SCHEMA
|
|
ENGINES ENGINE
|
|
EVENTS EVENT_SCHEMA
|
|
FILES TABLE_SCHEMA
|
|
GLOBAL_STATUS VARIABLE_NAME
|
|
GLOBAL_VARIABLES VARIABLE_NAME
|
|
INDEX_STATISTICS TABLE_SCHEMA
|
|
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
|
|
PARTITIONS TABLE_SCHEMA
|
|
PLUGINS PLUGIN_NAME
|
|
PROCESSLIST ID
|
|
PROFILING QUERY_ID
|
|
REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
|
|
ROUTINES ROUTINE_SCHEMA
|
|
SCHEMATA SCHEMA_NAME
|
|
SCHEMA_PRIVILEGES TABLE_SCHEMA
|
|
SESSION_STATUS VARIABLE_NAME
|
|
SESSION_VARIABLES VARIABLE_NAME
|
|
STATISTICS TABLE_SCHEMA
|
|
TABLES TABLE_SCHEMA
|
|
TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
|
|
TABLE_PRIVILEGES TABLE_SCHEMA
|
|
TABLE_STATISTICS TABLE_SCHEMA
|
|
TRIGGERS TRIGGER_SCHEMA
|
|
USER_PRIVILEGES GRANTEE
|
|
USER_STATISTICS USER
|
|
VIEWS TABLE_SCHEMA
|
|
INNODB_BUFFER_POOL_PAGES page_type
|
|
PBXT_STATISTICS ID
|
|
INNODB_CMP page_size
|
|
INNODB_RSEG rseg_id
|
|
XTRADB_ENHANCEMENTS name
|
|
INNODB_BUFFER_POOL_PAGES_INDEX schema_name
|
|
INNODB_INDEX_STATS table_name
|
|
INNODB_TRX trx_id
|
|
INNODB_CMP_RESET page_size
|
|
INNODB_LOCK_WAITS requesting_trx_id
|
|
INNODB_CMPMEM_RESET page_size
|
|
INNODB_LOCKS lock_id
|
|
INNODB_CMPMEM page_size
|
|
INNODB_TABLE_STATS table_name
|
|
INNODB_BUFFER_POOL_PAGES_BLOB space_id
|
|
SELECT t.table_name, c1.column_name
|
|
FROM information_schema.tables t
|
|
INNER JOIN
|
|
information_schema.columns c1
|
|
ON t.table_schema = c1.table_schema AND
|
|
t.table_name = c1.table_name
|
|
WHERE t.table_schema = 'information_schema' AND
|
|
c1.ordinal_position =
|
|
( SELECT COALESCE(MIN(c2.ordinal_position),1)
|
|
FROM information_schema.columns c2
|
|
WHERE c2.table_schema = 'information_schema' AND
|
|
c2.table_name = t.table_name AND
|
|
c2.column_name LIKE '%SCHEMA%'
|
|
);
|
|
table_name column_name
|
|
CHARACTER_SETS CHARACTER_SET_NAME
|
|
CLIENT_STATISTICS CLIENT
|
|
COLLATIONS COLLATION_NAME
|
|
COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
|
|
COLUMNS TABLE_SCHEMA
|
|
COLUMN_PRIVILEGES TABLE_SCHEMA
|
|
ENGINES ENGINE
|
|
EVENTS EVENT_SCHEMA
|
|
FILES TABLE_SCHEMA
|
|
GLOBAL_STATUS VARIABLE_NAME
|
|
GLOBAL_VARIABLES VARIABLE_NAME
|
|
INDEX_STATISTICS TABLE_SCHEMA
|
|
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
|
|
PARTITIONS TABLE_SCHEMA
|
|
PLUGINS PLUGIN_NAME
|
|
PROCESSLIST ID
|
|
PROFILING QUERY_ID
|
|
REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
|
|
ROUTINES ROUTINE_SCHEMA
|
|
SCHEMATA SCHEMA_NAME
|
|
SCHEMA_PRIVILEGES TABLE_SCHEMA
|
|
SESSION_STATUS VARIABLE_NAME
|
|
SESSION_VARIABLES VARIABLE_NAME
|
|
STATISTICS TABLE_SCHEMA
|
|
TABLES TABLE_SCHEMA
|
|
TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
|
|
TABLE_PRIVILEGES TABLE_SCHEMA
|
|
TABLE_STATISTICS TABLE_SCHEMA
|
|
TRIGGERS TRIGGER_SCHEMA
|
|
USER_PRIVILEGES GRANTEE
|
|
USER_STATISTICS USER
|
|
VIEWS TABLE_SCHEMA
|
|
INNODB_BUFFER_POOL_PAGES page_type
|
|
PBXT_STATISTICS ID
|
|
INNODB_CMP page_size
|
|
INNODB_RSEG rseg_id
|
|
XTRADB_ENHANCEMENTS name
|
|
INNODB_BUFFER_POOL_PAGES_INDEX schema_name
|
|
INNODB_INDEX_STATS table_name
|
|
INNODB_TRX trx_id
|
|
INNODB_CMP_RESET page_size
|
|
INNODB_LOCK_WAITS requesting_trx_id
|
|
INNODB_CMPMEM_RESET page_size
|
|
INNODB_LOCKS lock_id
|
|
INNODB_CMPMEM page_size
|
|
INNODB_TABLE_STATS table_name
|
|
INNODB_BUFFER_POOL_PAGES_BLOB space_id
|
|
select 1 as f1 from information_schema.tables where "CHARACTER_SETS"=
|
|
(select cast(table_name as char) from information_schema.tables
|
|
order by table_name limit 1) limit 1;
|
|
f1
|
|
1
|
|
select t.table_name, group_concat(t.table_schema, '.', t.table_name),
|
|
count(*) as num1
|
|
from information_schema.tables t
|
|
inner join information_schema.columns c1
|
|
on t.table_schema = c1.table_schema AND t.table_name = c1.table_name
|
|
where t.table_schema = 'information_schema' and
|
|
c1.ordinal_position =
|
|
(select isnull(c2.column_type) -
|
|
isnull(group_concat(c2.table_schema, '.', c2.table_name)) +
|
|
count(*) as num
|
|
from information_schema.columns c2 where
|
|
c2.table_schema='information_schema' and
|
|
(c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)')
|
|
group by c2.column_type order by num limit 1)
|
|
group by t.table_name order by num1, t.table_name;
|
|
table_name group_concat(t.table_schema, '.', t.table_name) num1
|
|
CHARACTER_SETS information_schema.CHARACTER_SETS 1
|
|
CLIENT_STATISTICS information_schema.CLIENT_STATISTICS 1
|
|
COLLATIONS information_schema.COLLATIONS 1
|
|
COLLATION_CHARACTER_SET_APPLICABILITY information_schema.COLLATION_CHARACTER_SET_APPLICABILITY 1
|
|
COLUMNS information_schema.COLUMNS 1
|
|
COLUMN_PRIVILEGES information_schema.COLUMN_PRIVILEGES 1
|
|
ENGINES information_schema.ENGINES 1
|
|
EVENTS information_schema.EVENTS 1
|
|
FILES information_schema.FILES 1
|
|
GLOBAL_STATUS information_schema.GLOBAL_STATUS 1
|
|
GLOBAL_VARIABLES information_schema.GLOBAL_VARIABLES 1
|
|
INDEX_STATISTICS information_schema.INDEX_STATISTICS 1
|
|
INNODB_BUFFER_POOL_PAGES information_schema.INNODB_BUFFER_POOL_PAGES 1
|
|
INNODB_BUFFER_POOL_PAGES_BLOB information_schema.INNODB_BUFFER_POOL_PAGES_BLOB 1
|
|
INNODB_BUFFER_POOL_PAGES_INDEX information_schema.INNODB_BUFFER_POOL_PAGES_INDEX 1
|
|
INNODB_CMP information_schema.INNODB_CMP 1
|
|
INNODB_CMPMEM information_schema.INNODB_CMPMEM 1
|
|
INNODB_CMPMEM_RESET information_schema.INNODB_CMPMEM_RESET 1
|
|
INNODB_CMP_RESET information_schema.INNODB_CMP_RESET 1
|
|
INNODB_INDEX_STATS information_schema.INNODB_INDEX_STATS 1
|
|
INNODB_LOCKS information_schema.INNODB_LOCKS 1
|
|
INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
|
|
INNODB_RSEG information_schema.INNODB_RSEG 1
|
|
INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1
|
|
INNODB_TRX information_schema.INNODB_TRX 1
|
|
KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1
|
|
PARTITIONS information_schema.PARTITIONS 1
|
|
PBXT_STATISTICS information_schema.PBXT_STATISTICS 1
|
|
PLUGINS information_schema.PLUGINS 1
|
|
PROCESSLIST information_schema.PROCESSLIST 1
|
|
PROFILING information_schema.PROFILING 1
|
|
REFERENTIAL_CONSTRAINTS information_schema.REFERENTIAL_CONSTRAINTS 1
|
|
ROUTINES information_schema.ROUTINES 1
|
|
SCHEMATA information_schema.SCHEMATA 1
|
|
SCHEMA_PRIVILEGES information_schema.SCHEMA_PRIVILEGES 1
|
|
SESSION_STATUS information_schema.SESSION_STATUS 1
|
|
SESSION_VARIABLES information_schema.SESSION_VARIABLES 1
|
|
STATISTICS information_schema.STATISTICS 1
|
|
TABLES information_schema.TABLES 1
|
|
TABLE_CONSTRAINTS information_schema.TABLE_CONSTRAINTS 1
|
|
TABLE_PRIVILEGES information_schema.TABLE_PRIVILEGES 1
|
|
TABLE_STATISTICS information_schema.TABLE_STATISTICS 1
|
|
TRIGGERS information_schema.TRIGGERS 1
|
|
USER_PRIVILEGES information_schema.USER_PRIVILEGES 1
|
|
USER_STATISTICS information_schema.USER_STATISTICS 1
|
|
VIEWS information_schema.VIEWS 1
|
|
XTRADB_ENHANCEMENTS information_schema.XTRADB_ENHANCEMENTS 1
|
|
Database: information_schema
|
|
+---------------------------------------+
|
|
| Tables |
|
|
+---------------------------------------+
|
|
| CHARACTER_SETS |
|
|
| CLIENT_STATISTICS |
|
|
| COLLATIONS |
|
|
| COLLATION_CHARACTER_SET_APPLICABILITY |
|
|
| COLUMNS |
|
|
| COLUMN_PRIVILEGES |
|
|
| ENGINES |
|
|
| EVENTS |
|
|
| FILES |
|
|
| GLOBAL_STATUS |
|
|
| GLOBAL_VARIABLES |
|
|
| INDEX_STATISTICS |
|
|
| KEY_COLUMN_USAGE |
|
|
| PARTITIONS |
|
|
| PLUGINS |
|
|
| PROCESSLIST |
|
|
| PROFILING |
|
|
| REFERENTIAL_CONSTRAINTS |
|
|
| ROUTINES |
|
|
| SCHEMATA |
|
|
| SCHEMA_PRIVILEGES |
|
|
| SESSION_STATUS |
|
|
| SESSION_VARIABLES |
|
|
| STATISTICS |
|
|
| TABLES |
|
|
| TABLE_CONSTRAINTS |
|
|
| TABLE_PRIVILEGES |
|
|
| TABLE_STATISTICS |
|
|
| TRIGGERS |
|
|
| USER_PRIVILEGES |
|
|
| USER_STATISTICS |
|
|
| VIEWS |
|
|
| INNODB_BUFFER_POOL_PAGES |
|
|
| PBXT_STATISTICS |
|
|
| INNODB_CMP |
|
|
| INNODB_RSEG |
|
|
| XTRADB_ENHANCEMENTS |
|
|
| INNODB_BUFFER_POOL_PAGES_INDEX |
|
|
| INNODB_INDEX_STATS |
|
|
| INNODB_TRX |
|
|
| INNODB_CMP_RESET |
|
|
| INNODB_LOCK_WAITS |
|
|
| INNODB_CMPMEM_RESET |
|
|
| INNODB_LOCKS |
|
|
| INNODB_CMPMEM |
|
|
| INNODB_TABLE_STATS |
|
|
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
|
+---------------------------------------+
|
|
Database: INFORMATION_SCHEMA
|
|
+---------------------------------------+
|
|
| Tables |
|
|
+---------------------------------------+
|
|
| CHARACTER_SETS |
|
|
| CLIENT_STATISTICS |
|
|
| COLLATIONS |
|
|
| COLLATION_CHARACTER_SET_APPLICABILITY |
|
|
| COLUMNS |
|
|
| COLUMN_PRIVILEGES |
|
|
| ENGINES |
|
|
| EVENTS |
|
|
| FILES |
|
|
| GLOBAL_STATUS |
|
|
| GLOBAL_VARIABLES |
|
|
| INDEX_STATISTICS |
|
|
| KEY_COLUMN_USAGE |
|
|
| PARTITIONS |
|
|
| PLUGINS |
|
|
| PROCESSLIST |
|
|
| PROFILING |
|
|
| REFERENTIAL_CONSTRAINTS |
|
|
| ROUTINES |
|
|
| SCHEMATA |
|
|
| SCHEMA_PRIVILEGES |
|
|
| SESSION_STATUS |
|
|
| SESSION_VARIABLES |
|
|
| STATISTICS |
|
|
| TABLES |
|
|
| TABLE_CONSTRAINTS |
|
|
| TABLE_PRIVILEGES |
|
|
| TABLE_STATISTICS |
|
|
| TRIGGERS |
|
|
| USER_PRIVILEGES |
|
|
| USER_STATISTICS |
|
|
| VIEWS |
|
|
| INNODB_BUFFER_POOL_PAGES |
|
|
| PBXT_STATISTICS |
|
|
| INNODB_CMP |
|
|
| INNODB_RSEG |
|
|
| XTRADB_ENHANCEMENTS |
|
|
| INNODB_BUFFER_POOL_PAGES_INDEX |
|
|
| INNODB_INDEX_STATS |
|
|
| INNODB_TRX |
|
|
| INNODB_CMP_RESET |
|
|
| INNODB_LOCK_WAITS |
|
|
| INNODB_CMPMEM_RESET |
|
|
| INNODB_LOCKS |
|
|
| INNODB_CMPMEM |
|
|
| INNODB_TABLE_STATS |
|
|
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
|
+---------------------------------------+
|
|
Wildcard: inf_rmation_schema
|
|
+--------------------+
|
|
| Databases |
|
|
+--------------------+
|
|
| information_schema |
|
|
+--------------------+
|
|
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
|
|
table_schema count(*)
|
|
information_schema 47
|
|
mysql 22
|