Commit db8af318 authored by Sergei Golubchik's avatar Sergei Golubchik

SHOW and FLUSH for I_S tables.

Extend existing plugins to support
* SHOW QUERY_RESPONSE_TIME
* FLUSH QUERY_RESPONSE_TIME
* SHOW LOCALE

move userstat tables to use the new API instead of
hand-coded syntax
parent 932eaf31
......@@ -693,10 +693,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
if (mysql_refresh(mysql,
(uint) ~(REFRESH_GRANT | REFRESH_STATUS |
REFRESH_READ_LOCK | REFRESH_SLAVE |
REFRESH_MASTER | REFRESH_TABLE_STATS |
REFRESH_INDEX_STATS |
REFRESH_USER_STATS |
REFRESH_CLIENT_STATS)))
REFRESH_MASTER)))
{
my_printf_error(0, "refresh failed; error: '%s'", error_flags,
mysql_error(mysql));
......
......@@ -186,11 +186,7 @@ enum enum_server_command
#define REFRESH_USER_RESOURCES (1ULL << 19)
#define REFRESH_FOR_EXPORT (1ULL << 20) /* FLUSH TABLES ... FOR EXPORT */
#define REFRESH_TABLE_STATS (1ULL << 27) /* Refresh table stats hash table */
#define REFRESH_INDEX_STATS (1ULL << 28) /* Refresh index stats hash table */
#define REFRESH_USER_STATS (1ULL << 29) /* Refresh user stats hash table */
#define REFRESH_CLIENT_STATS (1ULL << 30) /* Refresh client stats hash table */
#define REFRESH_GENERIC (1ULL << 30)
#define REFRESH_FAST (1ULL << 31) /* Intern flag */
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
......
......@@ -1269,7 +1269,7 @@ performance-schema-max-rwlock-instances -1
performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
performance-schema-max-stage-classes 150
performance-schema-max-statement-classes 181
performance-schema-max-statement-classes 178
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
performance-schema-max-thread-classes 50
......
......@@ -180,12 +180,9 @@ select * from information_schema.index_statistics;
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
select * from information_schema.table_statistics;
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
show status like "%statistics%";
show status like "%generic%";
Variable_name Value
Com_show_client_statistics 0
Com_show_index_statistics 1
Com_show_table_statistics 1
Com_show_user_statistics 0
Com_show_generic 2
select connected_time <> 0, busy_time <> 0, bytes_received <> 0,
bytes_sent <> 0, binlog_bytes_written <> 0
from information_schema.user_statistics;
......
......@@ -116,7 +116,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -46,7 +46,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -36,13 +36,8 @@ TABLE performance_schema % NO NO
select digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
<<<<<<< HEAD
digest_text count_star
SELECT ? AS in_master_digest 1
=======
digest digest_text count_star
22e44734c3711653c51372e129da5d7f SELECT ? AS in_master_digest 1
>>>>>>> MDEV-5317 Compound statement / anonymous blocks
insert into test.marker values (2);
**** On Slave ****
select * from test.marker;
......@@ -68,13 +63,8 @@ TABLE slave foo YES YES
select digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
<<<<<<< HEAD
digest_text count_star
SELECT ? AS in_slave_digest 1
=======
digest digest_text count_star
ddeda363aafcef928734dcf9afe60d76 SELECT ? AS in_slave_digest 1
>>>>>>> MDEV-5317 Compound statement / anonymous blocks
**** On Master ****
delete from performance_schema.setup_objects
where object_schema='master';
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 0
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 0
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 0
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 0
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 0
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 0
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 0
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -111,7 +111,6 @@ DROP TRIGGER trg;
####################################
SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
<<<<<<< HEAD
SCHEMA_NAME DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
statements_digest TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
statements_digest SELECT ? FROM t1 1 0 0 0
......@@ -150,46 +149,6 @@ statements_digest DROP FUNCTION func 1 0 0 0
statements_digest CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0
statements_digest INSERT INTO t12 VALUES (?) 2 2 0 0
statements_digest DROP TRIGGER trg 1 0 0 0
=======
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
statements_digest a88df6e3c0760efe1288e012e305ac1b TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
statements_digest 6f98e578d7e016b83095e3ba47ee06a3 SELECT ? FROM t1 1 0 0 0
statements_digest 063d94a747f3086a8f52bef0ac0d95e6 SELECT ? FROM `t1` 1 0 0 0
statements_digest d981dbd1425e8f7a7ce9b11ee9b540a9 SELECT ?, ... FROM t1 2 0 0 0
statements_digest e3836f41d25ef0f12d2bfead9f9e4ba5 SELECT ? FROM t2 1 0 0 0
statements_digest 21c9de801f0e325050fd2adaf1dc1c82 SELECT ?, ... FROM t2 2 0 0 0
statements_digest 6c1b5c47bc04239226083501685023e0 INSERT INTO t1 VALUES (?) 1 1 0 0
statements_digest ced094851312b62e161ca6c52a93f253 INSERT INTO t2 VALUES (?) 1 1 0 0
statements_digest 523ba7a5e63133c3cf2d6117597d18a7 INSERT INTO t3 VALUES (...) 4 4 0 0
statements_digest 6192356916c06a3d9eacdfc909ceb15a INSERT INTO t4 VALUES (...) 1 1 0 0
statements_digest 794e70704f84d695e2668d59ecb68961 INSERT INTO t5 VALUES (...) 1 1 0 0
statements_digest d8daf9229bf069b2c2c83878d92ef9b5 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0
statements_digest 4d4e8facaea256c03b12e25e561102c1 INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0
statements_digest b025e1fa9324e8d9655dddbcaf9942f4 INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0
statements_digest 5dc73ac163595ff36a944dd8aa602b48 INSERT INTO t1 VALUES ( NULL ) 1 1 0 0
statements_digest 80040c738fbfc2bcf9b5ef31de57f5bf INSERT INTO t6 VALUES (...) 5 5 0 0
statements_digest aeb185ab9b6e9d5a49e47c8741b8acdf SELECT ? + ? 3 0 0 0
statements_digest d3804664eeee11407f3fcbd5c29a1f73 SELECT ? 1 0 0 0
statements_digest d2faa94bba9e4af44cd60fc19e56550d CREATE SCHEMA statements_digest_temp 2 2 0 0
statements_digest a43855a07cae52569ef7c23e74d6af53 DROP SCHEMA statements_digest_temp 2 0 0 0
statements_digest 2c73cd7777d8d43791b501798342cde8 SELECT ? FROM no_such_table 1 0 0 1
statements_digest f0eef43d84476d38fd70604bfb63a26b CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1
statements_digest e6a2f4869cfc84d0dd108eb8faa4d42b DROP TABLE dup_table 1 0 0 0
statements_digest 4e12863e0b8eacace4f84a0d6ac05c88 INSERT INTO t11 VALUES (?) 1 1 1 0
statements_digest d3eda26b379bd56340ce84fe395dfff7 SHOW WARNINGS 1 0 0 0
statements_digest dae9ba207d784b1eca3ab3ffb65ec30e PREPARE stmt FROM ? 1 0 0 0
statements_digest a44f4b7d63039640a75344e008b73c9b EXECUTE stmt 2 0 0 0
statements_digest 36f2dd152298707b7e95ba425737d2cc DEALLOCATE PREPARE stmt 1 0 0 0
statements_digest ebbf2166ce31a1ba4f82798c6cab1beb CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0
statements_digest 065c14e52c473d62ef7153e689cb41da CALL p1 ( ) 2 0 0 0
statements_digest 5f3f9f3b85dbfc4802edbd55449a64b7 DROP PROCEDURE p1 1 0 0 0
statements_digest 456a6abc6e28fd9f0f731dc98cfaf419 CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0
statements_digest a6fa9d3f94ed15f5a626da33430b7c95 SELECT func (...) 2 0 0 0
statements_digest 2bf3c4751ac825d34be28280f80bda97 DROP FUNCTION func 1 0 0 0
statements_digest a30279da2544f743746bfe467b9cc50b CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0
statements_digest a347955b86e599d7e0c4a4e3b2282fa2 INSERT INTO t12 VALUES (?) 2 2 0 0
statements_digest eb2873245de755d3d93312c48b850e7f DROP TRIGGER trg 1 0 0 0
>>>>>>> MDEV-5317 Compound statement / anonymous blocks
####################################
# CLEANUP
####################################
......
......@@ -123,7 +123,6 @@ DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
<<<<<<< HEAD
SELECT schema_name,digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
schema_name digest_text count_star
statements_digest TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
......@@ -165,49 +164,6 @@ statements_digest INSERT INTO t12 VALUES (?) 2
statements_digest DROP TRIGGER trg 1
SELECT digest_text FROM performance_schema.events_statements_current;
digest_text
=======
SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
schema_name digest digest_text count_star
statements_digest a88df6e3c0760efe1288e012e305ac1b TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
statements_digest 6f98e578d7e016b83095e3ba47ee06a3 SELECT ? FROM t1 1
statements_digest 063d94a747f3086a8f52bef0ac0d95e6 SELECT ? FROM `t1` 1
statements_digest d981dbd1425e8f7a7ce9b11ee9b540a9 SELECT ?, ... FROM t1 2
statements_digest e3836f41d25ef0f12d2bfead9f9e4ba5 SELECT ? FROM t2 1
statements_digest 21c9de801f0e325050fd2adaf1dc1c82 SELECT ?, ... FROM t2 2
statements_digest 6c1b5c47bc04239226083501685023e0 INSERT INTO t1 VALUES (?) 1
statements_digest ced094851312b62e161ca6c52a93f253 INSERT INTO t2 VALUES (?) 1
statements_digest 523ba7a5e63133c3cf2d6117597d18a7 INSERT INTO t3 VALUES (...) 4
statements_digest 6192356916c06a3d9eacdfc909ceb15a INSERT INTO t4 VALUES (...) 1
statements_digest 794e70704f84d695e2668d59ecb68961 INSERT INTO t5 VALUES (...) 1
statements_digest d8daf9229bf069b2c2c83878d92ef9b5 INSERT INTO t1 VALUES (?) /* , ... */ 2
statements_digest 4d4e8facaea256c03b12e25e561102c1 INSERT INTO t3 VALUES (...) /* , ... */ 1
statements_digest b025e1fa9324e8d9655dddbcaf9942f4 INSERT INTO t5 VALUES (...) /* , ... */ 1
statements_digest 5dc73ac163595ff36a944dd8aa602b48 INSERT INTO t1 VALUES ( NULL ) 1
statements_digest 80040c738fbfc2bcf9b5ef31de57f5bf INSERT INTO t6 VALUES (...) 5
statements_digest aeb185ab9b6e9d5a49e47c8741b8acdf SELECT ? + ? 3
statements_digest d3804664eeee11407f3fcbd5c29a1f73 SELECT ? 1
statements_digest d2faa94bba9e4af44cd60fc19e56550d CREATE SCHEMA statements_digest_temp 2
statements_digest a43855a07cae52569ef7c23e74d6af53 DROP SCHEMA statements_digest_temp 2
statements_digest 2c73cd7777d8d43791b501798342cde8 SELECT ? FROM no_such_table 1
statements_digest f0eef43d84476d38fd70604bfb63a26b CREATE TABLE dup_table ( c CHARACTER (?) ) 2
statements_digest e6a2f4869cfc84d0dd108eb8faa4d42b DROP TABLE dup_table 1
statements_digest 4e12863e0b8eacace4f84a0d6ac05c88 INSERT INTO t11 VALUES (?) 1
statements_digest d3eda26b379bd56340ce84fe395dfff7 SHOW WARNINGS 1
statements_digest dae9ba207d784b1eca3ab3ffb65ec30e PREPARE stmt FROM ? 1
statements_digest a44f4b7d63039640a75344e008b73c9b EXECUTE stmt 2
statements_digest 36f2dd152298707b7e95ba425737d2cc DEALLOCATE PREPARE stmt 1
statements_digest ebbf2166ce31a1ba4f82798c6cab1beb CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1
statements_digest 065c14e52c473d62ef7153e689cb41da CALL p1 ( ) 2
statements_digest 5f3f9f3b85dbfc4802edbd55449a64b7 DROP PROCEDURE p1 1
statements_digest 456a6abc6e28fd9f0f731dc98cfaf419 CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1
statements_digest a6fa9d3f94ed15f5a626da33430b7c95 SELECT func (...) 2
statements_digest 2bf3c4751ac825d34be28280f80bda97 DROP FUNCTION func 1
statements_digest a30279da2544f743746bfe467b9cc50b CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1
statements_digest a347955b86e599d7e0c4a4e3b2282fa2 INSERT INTO t12 VALUES (?) 2
statements_digest eb2873245de755d3d93312c48b850e7f DROP TRIGGER trg 1
SELECT digest, digest_text FROM performance_schema.events_statements_current;
digest digest_text
>>>>>>> MDEV-5317 Compound statement / anonymous blocks
####################################
# CLEANUP
####################################
......
......@@ -6,14 +6,7 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
####################################
# QUERYING PS STATEMENT DIGEST
####################################
<<<<<<< HEAD
SELECT schema_name, digest_text, count_star FROM events_statements_summary_by_digest;
schema_name digest_text count_star
performance_schema TRUNCATE TABLE events_statements_summary_by_digest 1
performance_schema SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
=======
SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest;
schema_name digest digest_text count_star
performance_schema 70f9d0c8bf1936f2fb83118b3ae880f0 TRUNCATE TABLE events_statements_summary_by_digest 1
performance_schema 63f9aaeed7859671c6a42c75fcd43785 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
>>>>>>> MDEV-5317 Compound statement / anonymous blocks
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -61,7 +61,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -60,7 +60,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -61,7 +61,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -60,7 +60,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
performance_schema_max_statement_classes 181
performance_schema_max_statement_classes 178
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
......
......@@ -111,3 +111,142 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU
108 zh_HK Chinese - Hong Kong SAR 3 3 . , english
109 el_GR Greek - Greece 11 9 , . greek
110 rm_CH Romansh - Switzerland 9 9 , ' english
show locales;
Id Name Description Error_Message_Language
0 en_US English - United States english
1 en_GB English - United Kingdom english
2 ja_JP Japanese - Japan japanese
3 sv_SE Swedish - Sweden swedish
4 de_DE German - Germany german
5 fr_FR French - France french
6 ar_AE Arabic - United Arab Emirates english
7 ar_BH Arabic - Bahrain english
8 ar_JO Arabic - Jordan english
9 ar_SA Arabic - Saudi Arabia english
10 ar_SY Arabic - Syria english
11 be_BY Belarusian - Belarus english
12 bg_BG Bulgarian - Bulgaria english
13 ca_ES Catalan - Catalan english
14 cs_CZ Czech - Czech Republic czech
15 da_DK Danish - Denmark danish
16 de_AT German - Austria german
17 es_ES Spanish - Spain spanish
18 et_EE Estonian - Estonia estonian
19 eu_ES Basque - Basque english
20 fi_FI Finnish - Finland english
21 fo_FO Faroese - Faroe Islands english
22 gl_ES Galician - Galician english
23 gu_IN Gujarati - India english
24 he_IL Hebrew - Israel english
25 hi_IN Hindi - India english
26 hr_HR Croatian - Croatia english
27 hu_HU Hungarian - Hungary hungarian
28 id_ID Indonesian - Indonesia english
29 is_IS Icelandic - Iceland english
30 it_CH Italian - Switzerland italian
31 ko_KR Korean - Korea korean
32 lt_LT Lithuanian - Lithuania english
33 lv_LV Latvian - Latvia english
34 mk_MK Macedonian - FYROM english
35 mn_MN Mongolia - Mongolian english
36 ms_MY Malay - Malaysia english
37 nb_NO Norwegian(Bokml) - Norway norwegian
38 nl_NL Dutch - The Netherlands dutch
39 pl_PL Polish - Poland polish
40 pt_BR Portugese - Brazil portuguese
41 pt_PT Portugese - Portugal portuguese
42 ro_RO Romanian - Romania romanian
43 ru_RU Russian - Russia russian
44 ru_UA Russian - Ukraine russian
45 sk_SK Slovak - Slovakia slovak
46 sl_SI Slovenian - Slovenia english
47 sq_AL Albanian - Albania english
48 sr_RS Serbian - Serbia serbian
49 ta_IN Tamil - India english
50 te_IN Telugu - India english
51 th_TH Thai - Thailand english
52 tr_TR Turkish - Turkey english
53 uk_UA Ukrainian - Ukraine ukrainian
54 ur_PK Urdu - Pakistan english
55 vi_VN Vietnamese - Vietnam english
56 zh_CN Chinese - Peoples Republic of China english
57 zh_TW Chinese - Taiwan english
58 ar_DZ Arabic - Algeria english
59 ar_EG Arabic - Egypt english
60 ar_IN Arabic - Iran english
61 ar_IQ Arabic - Iraq english
62 ar_KW Arabic - Kuwait english
63 ar_LB Arabic - Lebanon english
64 ar_LY Arabic - Libya english
65 ar_MA Arabic - Morocco english
66 ar_OM Arabic - Oman english
67 ar_QA Arabic - Qatar english
68 ar_SD Arabic - Sudan english
69 ar_TN Arabic - Tunisia english
70 ar_YE Arabic - Yemen english
71 de_BE German - Belgium german
72 de_CH German - Switzerland german
73 de_LU German - Luxembourg german
74 en_AU English - Australia english
75 en_CA English - Canada english
76 en_IN English - India english
77 en_NZ English - New Zealand english
78 en_PH English - Philippines english
79 en_ZA English - South Africa english
80 en_ZW English - Zimbabwe english
81 es_AR Spanish - Argentina spanish
82 es_BO Spanish - Bolivia spanish
83 es_CL Spanish - Chile spanish
84 es_CO Spanish - Columbia spanish
85 es_CR Spanish - Costa Rica spanish
86 es_DO Spanish - Dominican Republic spanish
87 es_EC Spanish - Ecuador spanish
88 es_GT Spanish - Guatemala spanish
89 es_HN Spanish - Honduras spanish
90 es_MX Spanish - Mexico spanish
91 es_NI Spanish - Nicaragua spanish
92 es_PA Spanish - Panama spanish
93 es_PE Spanish - Peru spanish
94 es_PR Spanish - Puerto Rico spanish
95 es_PY Spanish - Paraguay spanish
96 es_SV Spanish - El Salvador spanish
97 es_US Spanish - United States spanish
98 es_UY Spanish - Uruguay spanish
99 es_VE Spanish - Venezuela spanish
100 fr_BE French - Belgium french
101 fr_CA French - Canada french
102 fr_CH French - Switzerland french
103 fr_LU French - Luxembourg french
104 it_IT Italian - Italy italian
105 nl_BE Dutch - Belgium dutch
106 no_NO Norwegian - Norway norwegian
107 sv_FI Swedish - Finland swedish
108 zh_HK Chinese - Hong Kong SAR english
109 el_GR Greek - Greece greek
110 rm_CH Romansh - Switzerland english
show locales like '%spanish%';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'like '%spanish%'' at line 1
show locales where description like '%spanish%';
Id Name Description Error_Message_Language
17 es_ES Spanish - Spain spanish
81 es_AR Spanish - Argentina spanish
82 es_BO Spanish - Bolivia spanish
83 es_CL Spanish - Chile spanish
84 es_CO Spanish - Columbia spanish
85 es_CR Spanish - Costa Rica spanish
86 es_DO Spanish - Dominican Republic spanish
87 es_EC Spanish - Ecuador spanish
88 es_GT Spanish - Guatemala spanish
89 es_HN Spanish - Honduras spanish
90 es_MX Spanish - Mexico spanish
91 es_NI Spanish - Nicaragua spanish
92 es_PA Spanish - Panama spanish
93 es_PE Spanish - Peru spanish
94 es_PR Spanish - Puerto Rico spanish
95 es_PY Spanish - Paraguay spanish
96 es_SV Spanish - El Salvador spanish
97 es_US Spanish - United States spanish
98 es_UY Spanish - Uruguay spanish
99 es_VE Spanish - Venezuela spanish
flush locales;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'locales' at line 1
......@@ -16,3 +16,7 @@ set global query_cache_size = 0;
select * from information_schema.query_cache_info;
STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED
set global query_cache_size= default;
show query_cache_info;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_info' at line 1
flush query_cache_info;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_info' at line 1
......@@ -4,4 +4,10 @@ if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'lo
}
select * from information_schema.locales;
show locales;
--error ER_PARSE_ERROR
show locales like '%spanish%';
show locales where description like '%spanish%';
--error ER_PARSE_ERROR
flush locales;
......@@ -9,3 +9,8 @@ select * from information_schema.query_cache_info;
set global query_cache_size= default;
--error ER_PARSE_ERROR
show query_cache_info;
--error ER_PARSE_ERROR
flush query_cache_info;
......@@ -2627,9 +2627,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
SESSION_VALUE NULL
GLOBAL_VALUE 181
GLOBAL_VALUE 178
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 181
DEFAULT_VALUE 178
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
......
......@@ -2795,9 +2795,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
SESSION_VALUE NULL
GLOBAL_VALUE 181
GLOBAL_VALUE 178
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 181
DEFAULT_VALUE 178
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
......
......@@ -72,7 +72,7 @@ flush table_statistics;
flush index_statistics;
select * from information_schema.index_statistics;
select * from information_schema.table_statistics;
show status like "%statistics%";
show status like "%generic%";
#
# Test that some variables are not 0
......
......@@ -16,6 +16,7 @@
#include "feedback.h"
#include <sql_acl.h>
#include <sql_parse.h>
#include <sql_show.h>
#include <time.h>
namespace feedback {
......@@ -120,7 +121,7 @@ static int prepare_for_fill(TABLE_LIST *tables)
strlen(i_s_feedback->table_name),
0, TL_READ);
tables->schema_table= i_s_feedback;
tables->table= i_s_feedback->create_table(thd, tables);
tables->table= create_schema_table(thd, tables);
if (!tables->table)
return 1;
......
......@@ -38,14 +38,14 @@ static MY_LOCALE **locale_list;
/* LOCALES */
static ST_FIELD_INFO locale_info_locale_fields_info[]=
{
{"ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0, 0},
{"NAME", 255, MYSQL_TYPE_STRING, 0, 0, 0, 0},
{"DESCRIPTION", 255, MYSQL_TYPE_STRING, 0, 0, 0, 0},
{"ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Id", 0},
{"NAME", 255, MYSQL_TYPE_STRING, 0, 0, "Name", 0},
{"DESCRIPTION", 255, MYSQL_TYPE_STRING, 0, 0, "Description", 0},
{"MAX_MONTH_NAME_LENGTH", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0, 0},
{"MAX_DAY_NAME_LENGTH", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0, 0},
{"DECIMAL_POINT", 2, MYSQL_TYPE_STRING, 0, 0, 0, 0},
{"THOUSAND_SEP", 2, MYSQL_TYPE_STRING, 0, 0, 0, 0},
{"ERROR_MESSAGE_LANGUAGE", 64, MYSQL_TYPE_STRING, 0, 0, 0, 0},
{"ERROR_MESSAGE_LANGUAGE", 64, MYSQL_TYPE_STRING, 0, 0, "Error_Message_Language", 0},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, 0}
};
static int locale_info_fill_table_locale(THD* thd, TABLE_LIST* tables, COND* cond)
......
......@@ -2,7 +2,7 @@ SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base;
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
# Following two queries check works of FLUSH and
# respecting of "QUERY_RESPONSE_TIME_STATS" variable (see launchpad bug #855312)
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
......@@ -36,6 +36,6 @@ SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SHOW QUERY_RESPONSE_TIME;
SET SESSION query_response_time_exec_time_debug=default;
......@@ -3,7 +3,7 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1;
Warnings:
Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000001 0 0.000000
......@@ -144,8 +144,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000001 24 0.000000
0.000003 0 0.000000
0.000007 0 0.000000
......@@ -194,7 +194,7 @@ SET SESSION query_response_time_exec_time_debug=default;
SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2;
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000001 0 0.000000
......@@ -335,8 +335,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000001 24 0.000000
0.000003 0 0.000000
0.000007 0 0.000000
......@@ -385,7 +385,7 @@ SET SESSION query_response_time_exec_time_debug=default;
SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10;
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000001 0 0.000000
......@@ -496,8 +496,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 10
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000001 24 0.000000
0.000010 0 0.000000
0.000100 0 0.000000
......@@ -516,7 +516,7 @@ SET SESSION query_response_time_exec_time_debug=default;
SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7;
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000001 0 0.000000
......@@ -630,8 +630,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 7
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000001 24 0.000000
0.000008 0 0.000000
0.000059 0 0.000000
......@@ -653,7 +653,7 @@ SET SESSION query_response_time_exec_time_debug=default;
SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156;
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000041 0 0.000000
......@@ -757,8 +757,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 156
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000041 24 0.000000
0.006410 0 0.000000
1.000000 11 4.050000
......@@ -770,7 +770,7 @@ SET SESSION query_response_time_exec_time_debug=default;
SET SESSION query_response_time_exec_time_debug=100000;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000;
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000001 0 0.000000
......@@ -873,8 +873,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 1000
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000001 24 0.000000
0.001000 0 0.000000
1.000000 11 4.050000
......@@ -887,7 +887,7 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001;
Warnings:
Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
SET GLOBAL query_response_time_flush=1;
FLUSH QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
0.000001 0 0.000000
......@@ -990,8 +990,8 @@ SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 1000
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
TIME COUNT TOTAL
SHOW QUERY_RESPONSE_TIME;
Time Count Total
0.000001 24 0.000000
0.001000 0 0.000000
1.000000 11 4.050000
......
......@@ -72,9 +72,9 @@ static struct st_mysql_sys_var *query_response_time_info_vars[]=
ST_FIELD_INFO query_response_time_fields_info[] =
{
{ "TIME", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "", SKIP_OPEN_TABLE },
{ "COUNT", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, "", SKIP_OPEN_TABLE },
{ "TOTAL", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "", SKIP_OPEN_TABLE },
{ "TIME", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "Time", 0 },
{ "COUNT", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, "Count", 0 },
{ "TOTAL", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "Total", 0 },
{ 0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0 }
};
......@@ -84,6 +84,7 @@ static int query_response_time_info_init(void *p)
ST_SCHEMA_TABLE *i_s_query_response_time= (ST_SCHEMA_TABLE *) p;
i_s_query_response_time->fields_info= query_response_time_fields_info;
i_s_query_response_time->fill_table= query_response_time_fill;
i_s_query_response_time->reset_table= query_response_time_flush;
query_response_time_init();
return 0;
}
......
......@@ -286,9 +286,10 @@ void query_response_time_free()
query_response_time::g_collector.flush();
}
void query_response_time_flush()
int query_response_time_flush()
{
query_response_time::g_collector.flush();
return 0;
}
void query_response_time_collect(ulonglong query_time)
{
......
......@@ -56,7 +56,7 @@ extern ST_SCHEMA_TABLE query_response_time_table;
#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
extern void query_response_time_init ();
extern void query_response_time_free ();
extern void query_response_time_flush ();
extern int query_response_time_flush ();
extern void query_response_time_collect(ulonglong query_time);
extern int query_response_time_fill (THD* thd, TABLE_LIST *tables, COND *cond);
......
......@@ -116,7 +116,6 @@ static SYMBOL symbols[] = {
{ "CIPHER", SYM(CIPHER_SYM)},
{ "CLASS_ORIGIN", SYM(CLASS_ORIGIN_SYM)},
{ "CLIENT", SYM(CLIENT_SYM)},
{ "CLIENT_STATISTICS", SYM(CLIENT_STATS_SYM)},
{ "CLOSE", SYM(CLOSE_SYM)},
{ "COALESCE", SYM(COALESCE)},
{ "CODE", SYM(CODE_SYM)},
......@@ -279,7 +278,6 @@ static SYMBOL symbols[] = {
{ "IN", SYM(IN_SYM)},
{ "INDEX", SYM(INDEX_SYM)},
{ "INDEXES", SYM(INDEXES)},
{ "INDEX_STATISTICS", SYM(INDEX_STATS_SYM)},
{ "INFILE", SYM(INFILE)},
{ "INITIAL_SIZE", SYM(INITIAL_SIZE_SYM)},
{ "INNER", SYM(INNER_SYM)},
......@@ -591,7 +589,6 @@ static SYMBOL symbols[] = {
{ "TABLE_NAME", SYM(TABLE_NAME_SYM)},
{ "TABLES", SYM(TABLES)},
{ "TABLESPACE", SYM(TABLESPACE)},
{ "TABLE_STATISTICS", SYM(TABLE_STATS_SYM)},
{ "TABLE_CHECKSUM", SYM(TABLE_CHECKSUM_SYM)},
{ "TEMPORARY", SYM(TEMPORARY)},
{ "TEMPTABLE", SYM(TEMPTABLE_SYM)},
......@@ -635,7 +632,6 @@ static SYMBOL symbols[] = {
{ "USE", SYM(USE_SYM)},
{ "USER", SYM(USER)},
{ "USER_RESOURCES", SYM(RESOURCES)},
{ "USER_STATISTICS", SYM(USER_STATS_SYM)},
{ "USE_FRM", SYM(USE_FRM)},
{ "USING", SYM(USING)},
{ "UTC_DATE", SYM(UTC_DATE_SYM)},
......
......@@ -3781,7 +3781,6 @@ SHOW_VAR com_status_vars[]= {
{"show_binlog_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOG_EVENTS]), SHOW_LONG_STATUS},
{"show_binlogs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOGS]), SHOW_LONG_STATUS},
{"show_charsets", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CHARSETS]), SHOW_LONG_STATUS},
{"show_client_statistics", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CLIENT_STATS]), SHOW_LONG_STATUS},
{"show_collations", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLLATIONS]), SHOW_LONG_STATUS},
{"show_contributors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CONTRIBUTORS]), SHOW_LONG_STATUS},
{"show_create_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
......@@ -3802,8 +3801,8 @@ SHOW_VAR com_status_vars[]= {
{"show_function_code", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_FUNC_CODE]), SHOW_LONG_STATUS},
#endif
{"show_function_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS_FUNC]), SHOW_LONG_STATUS},
{"show_generic", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GENERIC]), SHOW_LONG_STATUS},
{"show_grants", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
{"show_index_statistics", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_INDEX_STATS]), SHOW_LONG_STATUS},
{"show_keys", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_KEYS]), SHOW_LONG_STATUS},
{"show_master_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_MASTER_STAT]), SHOW_LONG_STATUS},
{"show_open_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_OPEN_TABLES]), SHOW_LONG_STATUS},
......@@ -3821,11 +3820,9 @@ SHOW_VAR com_status_vars[]= {
{"show_slave_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_STAT]), SHOW_LONG_STATUS},
{"show_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS]), SHOW_LONG_STATUS},
{"show_storage_engines", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STORAGE_ENGINES]), SHOW_LONG_STATUS},
{"show_table_statistics", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLE_STATS]), SHOW_LONG_STATUS},
{"show_table_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLE_STATUS]), SHOW_LONG_STATUS},
{"show_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLES]), SHOW_LONG_STATUS},
{"show_triggers", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TRIGGERS]), SHOW_LONG_STATUS},
{"show_user_statistics", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_USER_STATS]), SHOW_LONG_STATUS},
{"show_variables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_VARIABLES]), SHOW_LONG_STATUS},
{"show_warnings", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_WARNS]), SHOW_LONG_STATUS},
{"shutdown", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHUTDOWN]), SHOW_LONG_STATUS},
......
......@@ -78,8 +78,7 @@ enum enum_sql_command {
SQLCOM_ALTER_TABLESPACE,
SQLCOM_INSTALL_PLUGIN, SQLCOM_UNINSTALL_PLUGIN,
SQLCOM_SHOW_AUTHORS, SQLCOM_BINLOG_BASE64_EVENT,
SQLCOM_SHOW_PLUGINS,
SQLCOM_SHOW_CONTRIBUTORS,
SQLCOM_SHOW_PLUGINS, SQLCOM_SHOW_CONTRIBUTORS,
SQLCOM_CREATE_SERVER, SQLCOM_DROP_SERVER, SQLCOM_ALTER_SERVER,
SQLCOM_CREATE_EVENT, SQLCOM_ALTER_EVENT, SQLCOM_DROP_EVENT,
SQLCOM_SHOW_CREATE_EVENT, SQLCOM_SHOW_EVENTS,
......@@ -89,12 +88,11 @@ enum enum_sql_command {
SQLCOM_SIGNAL, SQLCOM_RESIGNAL,
SQLCOM_SHOW_RELAYLOG_EVENTS,
SQLCOM_GET_DIAGNOSTICS,
SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS,
SQLCOM_SHOW_CLIENT_STATS,
SQLCOM_SLAVE_ALL_START, SQLCOM_SLAVE_ALL_STOP,
SQLCOM_SHOW_EXPLAIN, SQLCOM_SHUTDOWN,
SQLCOM_CREATE_ROLE, SQLCOM_DROP_ROLE, SQLCOM_GRANT_ROLE, SQLCOM_REVOKE_ROLE,
SQLCOM_COMPOUND,
SQLCOM_SHOW_GENERIC,
/*
When a command is added here, be sure it's also added in mysqld.cc
......
......@@ -390,6 +390,7 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_SHOW_EVENTS]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SHOW_OPEN_TABLES]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SHOW_PLUGINS]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_GENERIC]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_FIELDS]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SHOW_KEYS]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SHOW_VARIABLES]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE;
......@@ -424,10 +425,6 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_SHOW_PROFILES]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_PROFILE]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_BINLOG_BASE64_EVENT]= CF_STATUS_COMMAND | CF_CAN_GENERATE_ROW_EVENTS;
sql_command_flags[SQLCOM_SHOW_CLIENT_STATS]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_USER_STATS]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_TABLE_STATS]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_INDEX_STATS]= CF_STATUS_COMMAND;
sql_command_flags[SQLCOM_SHOW_TABLES]= (CF_STATUS_COMMAND | CF_SHOW_TABLE_COMMAND | CF_REEXECUTION_FRAGILE);
sql_command_flags[SQLCOM_SHOW_TABLE_STATUS]= (CF_STATUS_COMMAND | CF_SHOW_TABLE_COMMAND | CF_REEXECUTION_FRAGILE);
......@@ -2122,32 +2119,15 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
case SCH_CLIENT_STATS:
if (check_global_access(thd, SUPER_ACL | PROCESS_ACL, true))
DBUG_RETURN(1);
case SCH_TABLE_STATS:
case SCH_INDEX_STATS:
case SCH_OPEN_TABLES:
case SCH_PROCEDURES:
case SCH_CHARSETS:
case SCH_ENGINES:
case SCH_COLLATIONS:
case SCH_COLLATION_CHARACTER_SET_APPLICABILITY:
case SCH_USER_PRIVILEGES:
case SCH_SCHEMA_PRIVILEGES:
case SCH_TABLE_PRIVILEGES:
case SCH_COLUMN_PRIVILEGES:
case SCH_TABLE_CONSTRAINTS:
case SCH_KEY_COLUMN_USAGE:
default:
break;
}
SELECT_LEX *select_lex= lex->current_select;
if (make_schema_select(thd, select_lex, schema_table_idx))
{
if (make_schema_select(thd, select_lex, get_schema_table(schema_table_idx)))
DBUG_RETURN(1);
}
TABLE_LIST *table_list= select_lex->table_list.first;
table_list->schema_select_lex= schema_select_lex;
table_list->schema_table_reformed= 1;
select_lex->table_list.first->schema_select_lex= schema_select_lex;
DBUG_RETURN(0);
}
......@@ -2794,17 +2774,14 @@ mysql_execute_command(THD *thd)
case SQLCOM_SHOW_TRIGGERS:
case SQLCOM_SHOW_TABLE_STATUS:
case SQLCOM_SHOW_OPEN_TABLES:
case SQLCOM_SHOW_PLUGINS:
case SQLCOM_SHOW_GENERIC:
case SQLCOM_SHOW_FIELDS:
case SQLCOM_SHOW_KEYS:
case SQLCOM_SHOW_CLIENT_STATS:
case SQLCOM_SHOW_USER_STATS:
case SQLCOM_SHOW_TABLE_STATS:
case SQLCOM_SHOW_INDEX_STATS:
case SQLCOM_SELECT:
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd))
goto error;
case SQLCOM_SHOW_PLUGINS:
case SQLCOM_SHOW_VARIABLES:
case SQLCOM_SHOW_CHARSETS:
case SQLCOM_SHOW_COLLATIONS:
......
......@@ -25,6 +25,7 @@
#include "hostname.h" // hostname_cache_refresh
#include "sql_repl.h" // reset_master, reset_slave
#include "rpl_mi.h" // Master_info::data_lock
#include "sql_show.h"
#include "debug_sync.h"
#include "rpl_mi.h"
......@@ -377,35 +378,17 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
#endif
if (options & REFRESH_USER_RESOURCES)
reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */
if (options & REFRESH_TABLE_STATS)
{
mysql_mutex_lock(&LOCK_global_table_stats);
free_global_table_stats();
init_global_table_stats();
mysql_mutex_unlock(&LOCK_global_table_stats);
}
if (options & REFRESH_INDEX_STATS)
{
mysql_mutex_lock(&LOCK_global_index_stats);
free_global_index_stats();
init_global_index_stats();
mysql_mutex_unlock(&LOCK_global_index_stats);
}
if (options & (REFRESH_USER_STATS | REFRESH_CLIENT_STATS))
{
mysql_mutex_lock(&LOCK_global_user_client_stats);
if (options & REFRESH_USER_STATS)
{
free_global_user_stats();
init_global_user_stats();
}
if (options & REFRESH_CLIENT_STATS)
{
free_global_client_stats();
init_global_client_stats();
}
mysql_mutex_unlock(&LOCK_global_user_client_stats);
}
if (options & REFRESH_GENERIC)
{
List_iterator_fast<LEX_STRING> li(thd->lex->view_list);
LEX_STRING *ls;
while ((ls= li++))
{
ST_SCHEMA_TABLE *table= find_schema_table(thd, ls->str);
if (table->reset_table())
result= 1;
}
}
if (*write_to_binlog != -1)
*write_to_binlog= tmp_write_to_binlog;
/*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment