summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-08-25 19:08:01 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-11 18:53:04 +0200
commitdb8af31831beb949dfcf7675b3c6392dc52dc38c (patch)
tree875eb553866accbb0f05bfe8cbe3a789752d86f2
parent932eaf31e91cf875e336b8d9332682aca03c6e58 (diff)
downloadmariadb-git-db8af31831beb949dfcf7675b3c6392dc52dc38c.tar.gz
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
-rw-r--r--client/mysqladmin.cc5
-rw-r--r--include/mysql_com.h6
-rw-r--r--mysql-test/r/mysqld--help.result2
-rw-r--r--mysql-test/r/status_user.result7
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result2
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result2
-rw-r--r--mysql-test/suite/perfschema/r/rpl_gtid_func.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result2
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest.result41
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers.result44
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_long_query.result7
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result2
-rw-r--r--mysql-test/suite/plugins/r/locales.result139
-rw-r--r--mysql-test/suite/plugins/r/qc_info.result4
-rw-r--r--mysql-test/suite/plugins/t/locales.test6
-rw-r--r--mysql-test/suite/plugins/t/qc_info.test5
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result4
-rw-r--r--mysql-test/t/status_user.test2
-rw-r--r--plugin/feedback/sender_thread.cc3
-rw-r--r--plugin/locale_info/locale_info.cc8
-rw-r--r--plugin/query_response_time/mysql-test/query_response_time/query_response_time.inc4
-rw-r--r--plugin/query_response_time/mysql-test/query_response_time/query_response_time.result42
-rw-r--r--plugin/query_response_time/plugin.cc7
-rw-r--r--plugin/query_response_time/query_response_time.cc3
-rw-r--r--plugin/query_response_time/query_response_time.h2
-rw-r--r--sql/lex.h4
-rw-r--r--sql/mysqld.cc5
-rw-r--r--sql/sql_cmd.h6
-rw-r--r--sql/sql_parse.cc35
-rw-r--r--sql/sql_reload.cc41
-rw-r--r--sql/sql_show.cc162
-rw-r--r--sql/sql_show.h3
-rw-r--r--sql/sql_yacc.yy123
-rw-r--r--sql/table.h4
103 files changed, 457 insertions, 425 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index bd5d2eac4e5..5ba463f8d6f 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -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));
diff --git a/include/mysql_com.h b/include/mysql_com.h
index f1e32003791..3a794b36c1e 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -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 */
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index 7ab765b5a7b..0d7e2240769 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -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
diff --git a/mysql-test/r/status_user.result b/mysql-test/r/status_user.result
index 766a00f6f78..0b20f85fe0e 100644
--- a/mysql-test/r/status_user.result
+++ b/mysql-test/r/status_user.result
@@ -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;
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 8f90c924344..b6abc8b9489 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 3fdf7a2dab1..e462faeb648 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/rpl_gtid_func.result b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
index edb724aa2a3..86c8347addd 100644
--- a/mysql-test/suite/perfschema/r/rpl_gtid_func.result
+++ b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
@@ -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';
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
index fc2dac1b00b..a94cacf8867 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
index ae428299508..2c4ad5ce61e 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
index d69d74d68f3..6acae172655 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
index c4bd0cfa1fe..053963092fc 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index a4ac22f19fc..be1551d22ef 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
index a2d235c5f9c..f3e88f352ce 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
index 9d938ce80dc..c673926984a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
index 209c3b24e8c..379f70dd305 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
index aeaeb867045..caa059d27ac 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
index cb427c77524..d8b56ce7ff9 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
index 378eca3cad9..e729aff734a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
index 1af074ab4b9..56b9b9fcf3f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
index a52951d1093..71bcc4b511b 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
index ecff607ba23..08bc4361d1f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
index 35e535b815f..aa65d197374 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
index 8902aade191..4b04aa0664d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
index 6afe6fb9828..16cdaa38011 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
index 1ba0e485dea..e1a58fcb27a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
index 0c84ce0e8f9..a3e420cfc54 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
index b8cdcc5d487..5a26a380d31 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
index 17e1abce444..a25b54cbc9a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
index ffee34f560f..b9e42db6319 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
index e023660cdae..87048bf966f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
index d493d6ed731..d6386ea128c 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
index aac8eb245fa..99e5af5735a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
index 546fa8682e2..fc73f3dc640 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
index c184be8945a..0790471a331 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
index 9cc57fb9103..20da2200615 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
index dd8eb530816..2eabd30090f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
index 531a7146ca6..3aa2a980039 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
index 026c9fd9bfe..a616158627a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index 1cf31e6339a..c3550d8bdad 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index a4ac22f19fc..be1551d22ef 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result
index 2f87e29d5ad..a7983e5baaa 100644
--- a/mysql-test/suite/perfschema/r/statement_digest.result
+++ b/mysql-test/suite/perfschema/r/statement_digest.result
@@ -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
####################################
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
index 42454ebae77..8c5696bb139 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
@@ -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
####################################
diff --git a/mysql-test/suite/perfschema/r/statement_digest_long_query.result b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
index 13b2e8e8281..8bc7a877bda 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
index 755521428be..95201ca85f7 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
index 22a7f1bdf45..d03590aa9d2 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
index 79c6d7a21dd..de533f03c71 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
index 4992b55b0a5..647064d6771 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
index 4ae199c129b..c71d38c2641 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
index a59c4f794d5..f1325454cbe 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
index 38d4b185c72..4aea0b3f56a 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
index c5a0bd0d4d5..768e0ef2f29 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
index 99bd574607e..d988c282479 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
index 712ca9f4c2a..8f146f6f050 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
index 8c58b76cec1..136519c543f 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
index 5b834ea27d8..b17fa1ae07f 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
index 5e24f459a93..a336d191b67 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
index a7a61e6f16a..f39aa053a71 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
index 05299d114a0..68a81e02d11 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
index 5326c7062c0..aaf16173ffd 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
index d5e978f3d5e..44ad5aff909 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
index 4ce6a41fb78..49e8685cf7b 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
index bc6c4d796da..2c8ae8090cb 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
index f229a372ab1..bb4b86837e9 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
index 105008d44be..8d1856542a7 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
index 7e09ef0e726..27e6be11c5a 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
index 3b53ea621c8..bc7db7920f9 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
index 26de58126d6..4823250bae0 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
index 9eddd4e4272..8401fcf1796 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
index f6831d72302..6c5067bddb8 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
index 3b97128675c..27440fa1d72 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
index 1a95ca86544..e93787a461d 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
index 011faa3e388..2cd0057bf1d 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
index ea8151276e7..b31e6fdce90 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
index a4de57aebbe..f1a599c8d68 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
index a52fb516a23..325d5adb44a 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
index 4d22b83a9eb..57ccf608b65 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
index 19cef9fca2b..b654883db73 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
index 2824a073edf..7cf1695a192 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
index a8085acb6bf..0c824708e2a 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
@@ -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
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
index be935a809e1..fbc8136a04b 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
@@ -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
diff --git a/mysql-test/suite/plugins/r/locales.result b/mysql-test/suite/plugins/r/locales.result
index 9c65f8d6034..3ff43a3244c 100644
--- a/mysql-test/suite/plugins/r/locales.result
+++ b/mysql-test/suite/plugins/r/locales.result
@@ -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
diff --git a/mysql-test/suite/plugins/r/qc_info.result b/mysql-test/suite/plugins/r/qc_info.result
index ab646d74511..850e6db53f4 100644
--- a/mysql-test/suite/plugins/r/qc_info.result
+++ b/mysql-test/suite/plugins/r/qc_info.result
@@ -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
diff --git a/mysql-test/suite/plugins/t/locales.test b/mysql-test/suite/plugins/t/locales.test
index 5cfbe697384..a3afe75046f 100644
--- a/mysql-test/suite/plugins/t/locales.test
+++ b/mysql-test/suite/plugins/t/locales.test
@@ -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;
diff --git a/mysql-test/suite/plugins/t/qc_info.test b/mysql-test/suite/plugins/t/qc_info.test
index a081617c524..fcb523eca2c 100644
--- a/mysql-test/suite/plugins/t/qc_info.test
+++ b/mysql-test/suite/plugins/t/qc_info.test
@@ -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;
+
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 78578a1a15c..313d81af631 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -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.
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index c0e3ad54e0e..57a438c11c6 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -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.
diff --git a/mysql-test/t/status_user.test b/mysql-test/t/status_user.test
index 9a51d0e1020..ac25dcfef71 100644
--- a/mysql-test/t/status_user.test
+++ b/mysql-test/t/status_user.test
@@ -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
diff --git a/plugin/feedback/sender_thread.cc b/plugin/feedback/sender_thread.cc
index 465bdfa8feb..732118f245e 100644
--- a/plugin/feedback/sender_thread.cc
+++ b/plugin/feedback/sender_thread.cc
@@ -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;
diff --git a/plugin/locale_info/locale_info.cc b/plugin/locale_info/locale_info.cc
index 2d998b5c880..dd14dcbb769 100644
--- a/plugin/locale_info/locale_info.cc
+++ b/plugin/locale_info/locale_info.cc
@@ -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)
diff --git a/plugin/query_response_time/mysql-test/query_response_time/query_response_time.inc b/plugin/query_response_time/mysql-test/query_response_time/query_response_time.inc
index 28ef3d8cd2a..d13215aa5d4 100644
--- a/plugin/query_response_time/mysql-test/query_response_time/query_response_time.inc
+++ b/plugin/query_response_time/mysql-test/query_response_time/query_response_time.inc
@@ -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;
diff --git a/plugin/query_response_time/mysql-test/query_response_time/query_response_time.result b/plugin/query_response_time/mysql-test/query_response_time/query_response_time.result
index eac4888c76c..14822c35915 100644
--- a/plugin/query_response_time/mysql-test/query_response_time/query_response_time.result
+++ b/plugin/query_response_time/mysql-test/query_response_time/query_response_time.result
@@ -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
diff --git a/plugin/query_response_time/plugin.cc b/plugin/query_response_time/plugin.cc
index 4012ad09d2b..c34e4cb6e02 100644
--- a/plugin/query_response_time/plugin.cc
+++ b/plugin/query_response_time/plugin.cc
@@ -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;
}
diff --git a/plugin/query_response_time/query_response_time.cc b/plugin/query_response_time/query_response_time.cc
index b28962a5db4..7ea93515e4e 100644
--- a/plugin/query_response_time/query_response_time.cc
+++ b/plugin/query_response_time/query_response_time.cc
@@ -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)
{
diff --git a/plugin/query_response_time/query_response_time.h b/plugin/query_response_time/query_response_time.h
index 35b01b0db81..f59639f00a7 100644
--- a/plugin/query_response_time/query_response_time.h
+++ b/plugin/query_response_time/query_response_time.h
@@ -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);
diff --git a/sql/lex.h b/sql/lex.h
index 41be9b2673d..fe6298a2611 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -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)},
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index b21c588abe1..38f91967312 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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},
diff --git a/sql/sql_cmd.h b/sql/sql_cmd.h
index 09b3d927d92..dcc0b3303d8 100644
--- a/sql/sql_cmd.h
+++ b/sql/sql_cmd.h
@@ -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
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 262301b21da..452252788a9 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.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:
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 91d412a0c39..24e5d053145 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -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;
/*
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 3caef3b7c44..07ddb3fbea7 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3350,6 +3350,41 @@ int fill_schema_index_stats(THD *thd, TABLE_LIST *tables, COND *cond)
DBUG_RETURN(0);
}
+static int reset_schema_user_stats()
+{
+ mysql_mutex_lock(&LOCK_global_user_client_stats);
+ free_global_user_stats();
+ init_global_user_stats();
+ mysql_mutex_unlock(&LOCK_global_user_client_stats);
+ return 0;
+}
+
+static int reset_schema_client_stats()
+{
+ mysql_mutex_lock(&LOCK_global_user_client_stats);
+ free_global_client_stats();
+ init_global_client_stats();
+ mysql_mutex_unlock(&LOCK_global_user_client_stats);
+ return 0;
+}
+
+static int reset_schema_table_stats()
+{
+ mysql_mutex_lock(&LOCK_global_table_stats);
+ free_global_table_stats();
+ init_global_table_stats();
+ mysql_mutex_unlock(&LOCK_global_table_stats);
+ return 0;
+}
+
+static int reset_schema_index_stats()
+{
+ mysql_mutex_lock(&LOCK_global_index_stats);
+ free_global_index_stats();
+ init_global_index_stats();
+ mysql_mutex_unlock(&LOCK_global_index_stats);
+ return 0;
+}
/* collect status for all running threads */
@@ -3677,6 +3712,15 @@ bool get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
bzero((char*) lookup_field_values, sizeof(LOOKUP_FIELD_VALUES));
switch (lex->sql_command) {
+ case SQLCOM_SHOW_PLUGINS:
+ if (lex->ident.str)
+ {
+ thd->make_lex_string(&lookup_field_values->db_value,
+ lex->ident.str, lex->ident.length);
+ break;
+ }
+ /* fall through */
+ case SQLCOM_SHOW_GENERIC:
case SQLCOM_SHOW_DATABASES:
if (wild)
{
@@ -3698,17 +3742,6 @@ bool get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
lookup_field_values->wild_table_value= 1;
}
break;
- case SQLCOM_SHOW_PLUGINS:
- if (lex->ident.str)
- thd->make_lex_string(&lookup_field_values->db_value,
- lex->ident.str, lex->ident.length);
- else if (lex->wild)
- {
- thd->make_lex_string(&lookup_field_values->db_value,
- lex->wild->ptr(), lex->wild->length());
- lookup_field_values->wild_db_value= 1;
- }
- break;
default:
/*
The "default" is for queries over I_S.
@@ -7593,7 +7626,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
0 success
*/
-int make_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
+static int make_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
{
ST_FIELD_INFO *field_info= schema_table->fields_info;
Name_resolution_context *context= &thd->lex->select_lex.context;
@@ -7779,7 +7812,7 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
{
TABLE *table;
DBUG_ENTER("mysql_schema_table");
- if (!(table= table_list->schema_table->create_table(thd, table_list)))
+ if (!(table= create_schema_table(thd, table_list)))
DBUG_RETURN(1);
table->s->tmp_table= SYSTEM_TMP_TABLE;
table->grant.privilege= SELECT_ACL;
@@ -7859,9 +7892,8 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
*/
int make_schema_select(THD *thd, SELECT_LEX *sel,
- enum enum_schema_tables schema_table_idx)
+ ST_SCHEMA_TABLE *schema_table)
{
- ST_SCHEMA_TABLE *schema_table= get_schema_table(schema_table_idx);
LEX_STRING db, table;
DBUG_ENTER("make_schema_select");
DBUG_PRINT("enter", ("mysql_schema_select: %s", schema_table->table_name));
@@ -7878,13 +7910,13 @@ int make_schema_select(THD *thd, SELECT_LEX *sel,
DBUG_RETURN(1);
if (schema_table->old_format(thd, schema_table))
-
DBUG_RETURN(1);
if (!sel->add_table_to_list(thd, new Table_ident(thd, db, table, 0),
0, 0, TL_READ, MDL_SHARED_READ))
DBUG_RETURN(1);
+ sel->table_list.first->schema_table_reformed= 1;
DBUG_RETURN(0);
}
@@ -9024,103 +9056,103 @@ ST_FIELD_INFO show_explain_fields_info[]=
ST_SCHEMA_TABLE schema_tables[]=
{
- {"ALL_PLUGINS", plugin_fields_info, create_schema_table,
+ {"ALL_PLUGINS", plugin_fields_info, 0,
fill_all_plugins, make_old_format, 0, 5, -1, 0, 0},
- {"APPLICABLE_ROLES", applicable_roles_fields_info, create_schema_table,
+ {"APPLICABLE_ROLES", applicable_roles_fields_info, 0,
fill_schema_applicable_roles, 0, 0, -1, -1, 0, 0},
- {"CHARACTER_SETS", charsets_fields_info, create_schema_table,
+ {"CHARACTER_SETS", charsets_fields_info, 0,
fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0, 0},
- {"CLIENT_STATISTICS", client_stats_fields_info, create_schema_table,
+ {"CLIENT_STATISTICS", client_stats_fields_info, reset_schema_client_stats,
fill_schema_client_stats, make_old_format, 0, -1, -1, 0, 0},
- {"COLLATIONS", collation_fields_info, create_schema_table,
+ {"COLLATIONS", collation_fields_info, 0,
fill_schema_collation, make_old_format, 0, -1, -1, 0, 0},
{"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
- create_schema_table, fill_schema_coll_charset_app, 0, 0, -1, -1, 0, 0},
- {"COLUMNS", columns_fields_info, create_schema_table,
+ 0, fill_schema_coll_charset_app, 0, 0, -1, -1, 0, 0},
+ {"COLUMNS", columns_fields_info, 0,
get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0,
OPTIMIZE_I_S_TABLE|OPEN_VIEW_FULL},
- {"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
+ {"COLUMN_PRIVILEGES", column_privileges_fields_info, 0,
fill_schema_column_privileges, 0, 0, -1, -1, 0, 0},
- {"ENABLED_ROLES", enabled_roles_fields_info, create_schema_table,
+ {"ENABLED_ROLES", enabled_roles_fields_info, 0,
fill_schema_enabled_roles, 0, 0, -1, -1, 0, 0},
- {"ENGINES", engines_fields_info, create_schema_table,
+ {"ENGINES", engines_fields_info, 0,
fill_schema_engines, make_old_format, 0, -1, -1, 0, 0},
#ifdef HAVE_EVENT_SCHEDULER
- {"EVENTS", events_fields_info, create_schema_table,
+ {"EVENTS", events_fields_info, 0,
Events::fill_schema_events, make_old_format, 0, -1, -1, 0, 0},
#else
- {"EVENTS", events_fields_info, create_schema_table,
+ {"EVENTS", events_fields_info, 0,
0, make_old_format, 0, -1, -1, 0, 0},
#endif
- {"EXPLAIN", show_explain_fields_info, create_schema_table, fill_show_explain,
+ {"EXPLAIN", show_explain_fields_info, 0, fill_show_explain,
make_old_format, 0, -1, -1, TRUE /*hidden*/ , 0},
- {"FILES", files_fields_info, create_schema_table,
+ {"FILES", files_fields_info, 0,
hton_fill_schema_table, 0, 0, -1, -1, 0, 0},
- {"GLOBAL_STATUS", variables_fields_info, create_schema_table,
+ {"GLOBAL_STATUS", variables_fields_info, 0,
fill_status, make_old_format, 0, 0, -1, 0, 0},
- {"GLOBAL_VARIABLES", variables_fields_info, create_schema_table,
+ {"GLOBAL_VARIABLES", variables_fields_info, 0,
fill_variables, make_old_format, 0, 0, -1, 0, 0},
- {"INDEX_STATISTICS", index_stats_fields_info, create_schema_table,
+ {"INDEX_STATISTICS", index_stats_fields_info, reset_schema_index_stats,
fill_schema_index_stats, make_old_format, 0, -1, -1, 0, 0},
- {"KEY_CACHES", keycache_fields_info, create_schema_table,
- fill_key_cache_tables, make_old_format, 0, -1,-1, 0, 0},
- {"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
+ {"KEY_CACHES", keycache_fields_info, 0,
+ fill_key_cache_tables, 0, 0, -1,-1, 0, 0},
+ {"KEY_COLUMN_USAGE", key_column_usage_fields_info, 0,
get_all_tables, 0, get_schema_key_column_usage_record, 4, 5, 0,
OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
- {"OPEN_TABLES", open_tables_fields_info, create_schema_table,
+ {"OPEN_TABLES", open_tables_fields_info, 0,
fill_open_tables, make_old_format, 0, -1, -1, 1, 0},
- {"PARAMETERS", parameters_fields_info, create_schema_table,
+ {"PARAMETERS", parameters_fields_info, 0,
fill_schema_proc, 0, 0, -1, -1, 0, 0},
- {"PARTITIONS", partitions_fields_info, create_schema_table,
+ {"PARTITIONS", partitions_fields_info, 0,
get_all_tables, 0, get_schema_partitions_record, 1, 2, 0,
OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
- {"PLUGINS", plugin_fields_info, create_schema_table,
+ {"PLUGINS", plugin_fields_info, 0,
fill_plugins, make_old_format, 0, -1, -1, 0, 0},
- {"PROCESSLIST", processlist_fields_info, create_schema_table,
+ {"PROCESSLIST", processlist_fields_info, 0,
fill_schema_processlist, make_old_format, 0, -1, -1, 0, 0},
- {"PROFILING", query_profile_statistics_info, create_schema_table,
+ {"PROFILING", query_profile_statistics_info, 0,
fill_query_profile_statistics_info, make_profile_table_for_show,
NULL, -1, -1, false, 0},
{"REFERENTIAL_CONSTRAINTS", referential_constraints_fields_info,
- create_schema_table, get_all_tables, 0, get_referential_constraints_record,
+ 0, get_all_tables, 0, get_referential_constraints_record,
1, 9, 0, OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
- {"ROUTINES", proc_fields_info, create_schema_table,
+ {"ROUTINES", proc_fields_info, 0,
fill_schema_proc, make_proc_old_format, 0, -1, -1, 0, 0},
- {"SCHEMATA", schema_fields_info, create_schema_table,
+ {"SCHEMATA", schema_fields_info, 0,
fill_schema_schemata, make_schemata_old_format, 0, 1, -1, 0, 0},
- {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
+ {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, 0,
fill_schema_schema_privileges, 0, 0, -1, -1, 0, 0},
- {"SESSION_STATUS", variables_fields_info, create_schema_table,
+ {"SESSION_STATUS", variables_fields_info, 0,
fill_status, make_old_format, 0, 0, -1, 0, 0},
- {"SESSION_VARIABLES", variables_fields_info, create_schema_table,
+ {"SESSION_VARIABLES", variables_fields_info, 0,
fill_variables, make_old_format, 0, 0, -1, 0, 0},
- {"STATISTICS", stat_fields_info, create_schema_table,
+ {"STATISTICS", stat_fields_info, 0,
get_all_tables, make_old_format, get_schema_stat_record, 1, 2, 0,
OPEN_TABLE_ONLY|OPTIMIZE_I_S_TABLE},
- {"SYSTEM_VARIABLES", sysvars_fields_info, create_schema_table,
+ {"SYSTEM_VARIABLES", sysvars_fields_info, 0,
fill_sysvars, make_old_format, 0, 0, -1, 0, 0},
- {"TABLES", tables_fields_info, create_schema_table,
+ {"TABLES", tables_fields_info, 0,
get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0,
OPTIMIZE_I_S_TABLE},
- {"TABLESPACES", tablespaces_fields_info, create_schema_table,
+ {"TABLESPACES", tablespaces_fields_info, 0,
hton_fill_schema_table, 0, 0, -1, -1, 0, 0},
- {"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
+ {"TABLE_CONSTRAINTS", table_constraints_fields_info, 0,
get_all_tables, 0, get_schema_constraints_record, 3, 4, 0,
OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
- {"TABLE_NAMES", table_names_fields_info, create_schema_table,
+ {"TABLE_NAMES", table_names_fields_info, 0,
get_all_tables, make_table_names_old_format, 0, 1, 2, 1, OPTIMIZE_I_S_TABLE},
- {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
+ {"TABLE_PRIVILEGES", table_privileges_fields_info, 0,
fill_schema_table_privileges, 0, 0, -1, -1, 0, 0},
- {"TABLE_STATISTICS", table_stats_fields_info, create_schema_table,
+ {"TABLE_STATISTICS", table_stats_fields_info, reset_schema_table_stats,
fill_schema_table_stats, make_old_format, 0, -1, -1, 0, 0},
- {"TRIGGERS", triggers_fields_info, create_schema_table,
+ {"TRIGGERS", triggers_fields_info, 0,
get_all_tables, make_old_format, get_schema_triggers_record, 5, 6, 0,
OPEN_TRIGGER_ONLY|OPTIMIZE_I_S_TABLE},
- {"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table,
+ {"USER_PRIVILEGES", user_privileges_fields_info, 0,
fill_schema_user_privileges, 0, 0, -1, -1, 0, 0},
- {"USER_STATISTICS", user_stats_fields_info, create_schema_table,
+ {"USER_STATISTICS", user_stats_fields_info, reset_schema_user_stats,
fill_schema_user_stats, make_old_format, 0, -1, -1, 0, 0},
- {"VIEWS", view_fields_info, create_schema_table,
+ {"VIEWS", view_fields_info, 0,
get_all_tables, 0, get_schema_views_record, 1, 2, 0,
OPEN_VIEW_ONLY|OPTIMIZE_I_S_TABLE},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
@@ -9139,8 +9171,6 @@ int initialize_schema_table(st_plugin_int *plugin)
plugin->data= schema_table; // shortcut for the future
if (plugin->plugin->init)
{
- schema_table->create_table= create_schema_table;
- schema_table->old_format= make_old_format;
schema_table->idx_field1= -1,
schema_table->idx_field2= -1;
@@ -9156,6 +9186,14 @@ int initialize_schema_table(st_plugin_int *plugin)
DBUG_RETURN(1);
}
+ if (!schema_table->old_format)
+ for (ST_FIELD_INFO *f= schema_table->fields_info; f->field_name; f++)
+ if (f->old_name && f->old_name[0])
+ {
+ schema_table->old_format= make_old_format;
+ break;
+ }
+
/* Make sure the plugin name is not set inside the init() function. */
schema_table->table_name= plugin->name.str;
}
diff --git a/sql/sql_show.h b/sql/sql_show.h
index 6373978ef49..a759c8d94f5 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -117,11 +117,12 @@ COND *make_cond_for_info_schema(COND *cond, TABLE_LIST *table);
ST_SCHEMA_TABLE *find_schema_table(THD *thd, const char* table_name);
ST_SCHEMA_TABLE *get_schema_table(enum enum_schema_tables schema_table_idx);
int make_schema_select(THD *thd, SELECT_LEX *sel,
- enum enum_schema_tables schema_table_idx);
+ ST_SCHEMA_TABLE *schema_table);
int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list);
bool get_schema_tables_result(JOIN *join,
enum enum_schema_table_state executed_place);
enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table);
+TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list);
/* These functions were under INNODB_COMPATIBILITY_HOOKS */
int get_quote_char_for_identifier(THD *thd, const char *name, uint length);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 417110de76a..edc8e47a2b5 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -48,6 +48,7 @@
#include "sp_pcontext.h"
#include "sp_rcontext.h"
#include "sp.h"
+#include "sql_show.h"
#include "sql_alter.h" // Sql_cmd_alter_table*
#include "sql_truncate.h" // Sql_cmd_truncate_table
#include "sql_admin.h" // Sql_cmd_analyze/Check..._table
@@ -139,12 +140,13 @@ int yylex(void *yylval, void *yythd);
parser.
*/
-void my_parse_error(const char *s)
+void my_parse_error(const char *s, const char *yytext=0)
{
THD *thd= current_thd;
Lex_input_stream *lip= & thd->m_parser_state->m_lip;
- const char *yytext= lip->get_tok_start();
+ if (!yytext)
+ yytext= lip->get_tok_start();
if (!yytext)
yytext= "";
@@ -1009,7 +1011,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token CIPHER_SYM
%token CLASS_ORIGIN_SYM /* SQL-2003-N */
%token CLIENT_SYM
-%token CLIENT_STATS_SYM
%token CLOSE_SYM /* SQL-2003-R */
%token COALESCE /* SQL-2003-N */
%token CODE_SYM
@@ -1180,7 +1181,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token IMPORT
%token INDEXES
%token INDEX_SYM
-%token INDEX_STATS_SYM
%token INFILE
%token INITIAL_SIZE_SYM
%token INNER_SYM /* SQL-2003-R */
@@ -1497,7 +1497,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token TABLES
%token TABLESPACE
%token TABLE_REF_PRIORITY
-%token TABLE_STATS_SYM
%token TABLE_SYM /* SQL-2003-R */
%token TABLE_CHECKSUM_SYM
%token TABLE_NAME_SYM /* SQL-2003-N */
@@ -1546,7 +1545,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token UPGRADE_SYM
%token USAGE /* SQL-2003-N */
%token USER /* SQL-2003-R */
-%token USER_STATS_SYM
%token USE_FRM
%token USE_SYM
%token USING /* SQL-2003-R */
@@ -1624,7 +1622,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
table_ident_opt_wild create_like
%type <simple_string>
- remember_name remember_end opt_db text_or_password
+ remember_name remember_end opt_db text_or_password remember_tok_start
+ wild_and_where
%type <string>
text_string opt_gconcat_separator
@@ -2076,7 +2075,7 @@ execute_var_ident:
'@' ident_or_text
{
LEX *lex=Lex;
- LEX_STRING *lexstr= (LEX_STRING*)sql_memdup(&$2, sizeof(LEX_STRING));
+ LEX_STRING *lexstr= (LEX_STRING*)thd->memdup(&$2, sizeof(LEX_STRING));
if (!lexstr || lex->prepared_stmt_params.push_back(lexstr))
MYSQL_YYABORT;
}
@@ -6093,7 +6092,7 @@ virtual_column_func:
MYSQL_YYABORT;
}
uint expr_len= (uint)($3 - $1) - 1;
- Lex->vcol_info->expr_str.str= (char* ) sql_memdup($1 + 1, expr_len);
+ Lex->vcol_info->expr_str.str= (char* ) thd->memdup($1 + 1, expr_len);
Lex->vcol_info->expr_str.length= expr_len;
Lex->vcol_info->expr_item= $2;
}
@@ -8019,12 +8018,12 @@ table_column_list:
| ident
{
Lex->column_list->push_back((LEX_STRING*)
- sql_memdup(&$1, sizeof(LEX_STRING)));
+ thd->memdup(&$1, sizeof(LEX_STRING)));
}
| table_column_list ',' ident
{
Lex->column_list->push_back((LEX_STRING*)
- sql_memdup(&$3, sizeof(LEX_STRING)));
+ thd->memdup(&$3, sizeof(LEX_STRING)));
}
;
@@ -8039,14 +8038,14 @@ table_index_name:
ident
{
Lex->index_list->push_back(
- (LEX_STRING*) sql_memdup(&$1, sizeof(LEX_STRING)));
+ (LEX_STRING*) thd->memdup(&$1, sizeof(LEX_STRING)));
}
|
PRIMARY_SYM
{
LEX_STRING str= {(char*) "PRIMARY", 7};
Lex->index_list->push_back(
- (LEX_STRING*) sql_memdup(&str, sizeof(LEX_STRING)));
+ (LEX_STRING*) thd->memdup(&str, sizeof(LEX_STRING)));
}
;
@@ -8527,6 +8526,12 @@ select_item:
}
;
+remember_tok_start:
+ {
+ $$= (char*) YYLIP->get_tok_start();
+ }
+ ;
+
remember_name:
{
$$= (char*) YYLIP->get_cpp_tok_start();
@@ -11079,7 +11084,7 @@ opt_table_alias:
/* empty */ { $$=0; }
| table_alias ident
{
- $$= (LEX_STRING*) sql_memdup(&$2,sizeof(LEX_STRING));
+ $$= (LEX_STRING*) thd->memdup(&$2,sizeof(LEX_STRING));
if ($$ == NULL)
MYSQL_YYABORT;
}
@@ -12555,34 +12560,6 @@ show_param:
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
Lex->verbose= 0;
}
- | CLIENT_STATS_SYM
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_CLIENT_STATS;
- if (prepare_schema_table(thd, lex, 0, SCH_CLIENT_STATS))
- MYSQL_YYABORT;
- }
- | USER_STATS_SYM
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_USER_STATS;
- if (prepare_schema_table(thd, lex, 0, SCH_USER_STATS))
- MYSQL_YYABORT;
- }
- | TABLE_STATS_SYM
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_TABLE_STATS;
- if (prepare_schema_table(thd, lex, 0, SCH_TABLE_STATS))
- MYSQL_YYABORT;
- }
- | INDEX_STATS_SYM
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_INDEX_STATS;
- if (prepare_schema_table(thd, lex, 0, SCH_INDEX_STATS))
- MYSQL_YYABORT;
- }
| CREATE PROCEDURE_SYM sp_name
{
LEX *lex= Lex;
@@ -12639,6 +12616,24 @@ show_param:
MYSQL_YYABORT;
add_value_to_list(thd, $3);
}
+ | IDENT_sys remember_tok_start wild_and_where
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_GENERIC;
+ ST_SCHEMA_TABLE *table= find_schema_table(thd, $1.str);
+ if (!table || !table->old_format)
+ {
+ my_parse_error(ER(ER_SYNTAX_ERROR), $2);
+ MYSQL_YYABORT;
+ }
+ if (lex->wild && table->idx_field1 < 0)
+ {
+ my_parse_error(ER(ER_SYNTAX_ERROR), $3);
+ MYSQL_YYABORT;
+ }
+ if (make_schema_select(thd, Lex->current_select, table))
+ MYSQL_YYABORT;
+ }
;
show_engine_param:
@@ -12686,19 +12681,21 @@ binlog_from:
;
wild_and_where:
- /* empty */
- | LIKE TEXT_STRING_sys
+ /* empty */ { $$= 0; }
+ | LIKE remember_tok_start TEXT_STRING_sys
{
- Lex->wild= new (thd->mem_root) String($2.str, $2.length,
+ Lex->wild= new (thd->mem_root) String($3.str, $3.length,
system_charset_info);
if (Lex->wild == NULL)
MYSQL_YYABORT;
+ $$= $2;
}
- | WHERE expr
+ | WHERE remember_tok_start expr
{
- Select->where= normalize_cond($2);
- if ($2)
- $2->top_level_item();
+ Select->where= normalize_cond($3);
+ if ($3)
+ $3->top_level_item();
+ $$= $2;
}
;
@@ -12877,20 +12874,24 @@ flush_option:
lex->type|= REFRESH_SLAVE;
lex->reset_slave_info.all= false;
}
- | CLIENT_STATS_SYM
- { Lex->type|= REFRESH_CLIENT_STATS; }
- | USER_STATS_SYM
- { Lex->type|= REFRESH_USER_STATS; }
- | TABLE_STATS_SYM
- { Lex->type|= REFRESH_TABLE_STATS; }
- | INDEX_STATS_SYM
- { Lex->type|= REFRESH_INDEX_STATS; }
| MASTER_SYM
{ Lex->type|= REFRESH_MASTER; }
| DES_KEY_FILE
{ Lex->type|= REFRESH_DES_KEY_FILE; }
| RESOURCES
{ Lex->type|= REFRESH_USER_RESOURCES; }
+ | IDENT_sys remember_tok_start
+ {
+ Lex->type|= REFRESH_GENERIC;
+ ST_SCHEMA_TABLE *table= find_schema_table(thd, $1.str);
+ if (!table || !table->reset_table)
+ {
+ my_parse_error(ER(ER_SYNTAX_ERROR), $2);
+ MYSQL_YYABORT;
+ }
+ Lex->view_list.push_back(
+ (LEX_STRING*)thd->memdup(&$1, sizeof(LEX_STRING)));
+ }
;
opt_table_list:
@@ -14111,7 +14112,6 @@ keyword_sp:
| CHAIN_SYM {}
| CHANGED {}
| CIPHER_SYM {}
- | CLIENT_STATS_SYM {}
| CLIENT_SYM {}
| CLASS_ORIGIN_SYM {}
| COALESCE {}
@@ -14193,7 +14193,6 @@ keyword_sp:
| ID_SYM {}
| IDENTIFIED_SYM {}
| IGNORE_SERVER_IDS_SYM {}
- | INDEX_STATS_SYM {}
| INVOKER_SYM {}
| IMPORT {}
| INDEXES {}
@@ -14358,7 +14357,6 @@ keyword_sp:
| SWAPS_SYM {}
| SWITCHES_SYM {}
| TABLE_NAME_SYM {}
- | TABLE_STATS_SYM {}
| TABLES {}
| TABLE_CHECKSUM_SYM {}
| TABLESPACE {}
@@ -14384,7 +14382,6 @@ keyword_sp:
| UNKNOWN_SYM {}
| UNTIL_SYM {}
| USER {}
- | USER_STATS_SYM {}
| USE_FRM {}
| VARIABLES {}
| VIEW_SYM {}
@@ -15994,12 +15991,12 @@ view_list:
ident
{
Lex->view_list.push_back((LEX_STRING*)
- sql_memdup(&$1, sizeof(LEX_STRING)));
+ thd->memdup(&$1, sizeof(LEX_STRING)));
}
| view_list ',' ident
{
Lex->view_list.push_back((LEX_STRING*)
- sql_memdup(&$3, sizeof(LEX_STRING)));
+ thd->memdup(&$3, sizeof(LEX_STRING)));
}
;
diff --git a/sql/table.h b/sql/table.h
index bbe4b181339..eca35d6c52c 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1487,8 +1487,8 @@ typedef struct st_schema_table
{
const char* table_name;
ST_FIELD_INFO *fields_info;
- /* Create information_schema table */
- TABLE *(*create_table) (THD *thd, TABLE_LIST *table_list);
+ /* for FLUSH table_name */
+ int (*reset_table) ();
/* Fill table with data */
int (*fill_table) (THD *thd, TABLE_LIST *tables, COND *cond);
/* Handle fileds for old SHOW */