diff options
author | unknown <kroki/tomash@moonlight.intranet> | 2006-11-21 16:49:18 +0300 |
---|---|---|
committer | unknown <kroki/tomash@moonlight.intranet> | 2006-11-21 16:49:18 +0300 |
commit | 7a45fb546fab6fe3fb2a26820ac39a8ee5cd45db (patch) | |
tree | 2f9f5a22be3929560e92f227333a411a4ec7a028 /sql/set_var.cc | |
parent | c6d317831ab8ccbef3685a5f03ca8c2cfa4d92f0 (diff) | |
download | mariadb-git-7a45fb546fab6fe3fb2a26820ac39a8ee5cd45db.tar.gz |
BUG#23159: prepared_stmt_count should be status variable
Make Prepared_stmt_count a global status variable, accessible via
SHOW STATUS LIKE 'Prepared_stmt_count';. Documentation should be
updated.
mysql-test/r/ps.result:
Update result for bug#16365: Prepared Statements: DoS with too many
open statements, according to bug#23159: prepared_stmt_count should be
status variable.
mysql-test/t/ps.test:
Update test case for bug#16365: Prepared Statements: DoS with too many
open statements, according to bug#23159: prepared_stmt_count should be
status variable.
sql/mysqld.cc:
Add Prepared_stmt_count as global status variable.
sql/set_var.cc:
Remove prepared_stmt_count as system variable.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 4433b6bf7d8..71ca382f9d9 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -119,7 +119,6 @@ static KEY_CACHE *create_key_cache(const char *name, uint length); void fix_sql_mode_var(THD *thd, enum_var_type type); static byte *get_error_count(THD *thd); static byte *get_warning_count(THD *thd); -static byte *get_prepared_stmt_count(THD *thd); static byte *get_have_innodb(THD *thd); /* @@ -482,9 +481,6 @@ static sys_var_readonly sys_warning_count("warning_count", OPT_SESSION, SHOW_LONG, get_warning_count); -static sys_var_readonly sys_prepared_stmt_count("prepared_stmt_count", - OPT_GLOBAL, SHOW_LONG, - get_prepared_stmt_count); /* alias for last_insert_id() to be compatible with Sybase */ #ifdef HAVE_REPLICATION @@ -604,7 +600,6 @@ sys_var *sys_variables[]= &sys_new_mode, &sys_old_passwords, &sys_preload_buff_size, - &sys_prepared_stmt_count, &sys_pseudo_thread_id, &sys_query_alloc_block_size, &sys_query_cache_size, @@ -860,7 +855,6 @@ struct show_var_st init_vars[]= { {"pid_file", (char*) pidfile_name, SHOW_CHAR}, {"port", (char*) &mysqld_port, SHOW_INT}, {sys_preload_buff_size.name, (char*) &sys_preload_buff_size, SHOW_SYS}, - {sys_prepared_stmt_count.name, (char*) &sys_prepared_stmt_count, SHOW_SYS}, {"protocol_version", (char*) &protocol_version, SHOW_INT}, {sys_query_alloc_block_size.name, (char*) &sys_query_alloc_block_size, SHOW_SYS}, @@ -2715,14 +2709,6 @@ static byte *get_have_innodb(THD *thd) } -static byte *get_prepared_stmt_count(THD *thd) -{ - pthread_mutex_lock(&LOCK_prepared_stmt_count); - thd->sys_var_tmp.ulong_value= prepared_stmt_count; - pthread_mutex_unlock(&LOCK_prepared_stmt_count); - return (byte*) &thd->sys_var_tmp.ulong_value; -} - /**************************************************************************** Main handling of variables: - Initialisation |