summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-09-03 15:16:43 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-11 10:23:21 +0200
commit2a4e8813f6820ca0771a8d7aa94016fbefa732ac (patch)
tree7ce1e3c8385736de5c8447cbca6b67991796b7cb /storage/perfschema
parent3fa8c279d57e4a23a8ee34f50d5261541bf928e5 (diff)
downloadmariadb-git-2a4e8813f6820ca0771a8d7aa94016fbefa732ac.tar.gz
GLOBAL_VALUE_ORIGIN=AUTO
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/pfs_autosize.cc58
-rw-r--r--storage/perfschema/unittest/stub_server_misc.h5
2 files changed, 44 insertions, 19 deletions
diff --git a/storage/perfschema/pfs_autosize.cc b/storage/perfschema/pfs_autosize.cc
index 38bd36d8321..9bf70ceb216 100644
--- a/storage/perfschema/pfs_autosize.cc
+++ b/storage/perfschema/pfs_autosize.cc
@@ -21,6 +21,7 @@
#include "my_global.h"
#include "sql_const.h"
#include "pfs_server.h"
+#include "set_var.h"
#include <algorithm>
using std::min;
@@ -206,7 +207,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
{
count= handle;
- p->m_table_sizing= apply_load_factor(count, h->m_load_factor_volatile);
+ SYSVAR_AUTOSIZE(p->m_table_sizing,
+ apply_load_factor(count, h->m_load_factor_volatile));
}
if (p->m_table_share_sizing < 0)
@@ -214,62 +216,74 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
count= share;
count= max<ulong>(count, h->m_min_number_of_tables);
- p->m_table_share_sizing= apply_load_factor(count, h->m_load_factor_static);
+ SYSVAR_AUTOSIZE(p->m_table_share_sizing,
+ apply_load_factor(count, h->m_load_factor_static));
}
if (p->m_account_sizing < 0)
{
- p->m_account_sizing= h->m_account_sizing;
+ SYSVAR_AUTOSIZE(p->m_account_sizing,
+ h->m_account_sizing);
}
if (p->m_user_sizing < 0)
{
- p->m_user_sizing= h->m_user_sizing;
+ SYSVAR_AUTOSIZE(p->m_user_sizing,
+ h->m_user_sizing);
}
if (p->m_host_sizing < 0)
{
- p->m_host_sizing= h->m_host_sizing;
+ SYSVAR_AUTOSIZE(p->m_host_sizing,
+ h->m_host_sizing);
}
if (p->m_events_waits_history_sizing < 0)
{
- p->m_events_waits_history_sizing= h->m_events_waits_history_sizing;
+ SYSVAR_AUTOSIZE(p->m_events_waits_history_sizing,
+ h->m_events_waits_history_sizing);
}
if (p->m_events_waits_history_long_sizing < 0)
{
- p->m_events_waits_history_long_sizing= h->m_events_waits_history_long_sizing;
+ SYSVAR_AUTOSIZE(p->m_events_waits_history_long_sizing,
+ h->m_events_waits_history_long_sizing);
}
if (p->m_events_stages_history_sizing < 0)
{
- p->m_events_stages_history_sizing= h->m_events_stages_history_sizing;
+ SYSVAR_AUTOSIZE(p->m_events_stages_history_sizing,
+ h->m_events_stages_history_sizing);
}
if (p->m_events_stages_history_long_sizing < 0)
{
- p->m_events_stages_history_long_sizing= h->m_events_stages_history_long_sizing;
+ SYSVAR_AUTOSIZE(p->m_events_stages_history_long_sizing,
+ h->m_events_stages_history_long_sizing);
}
if (p->m_events_statements_history_sizing < 0)
{
- p->m_events_statements_history_sizing= h->m_events_statements_history_sizing;
+ SYSVAR_AUTOSIZE(p->m_events_statements_history_sizing,
+ h->m_events_statements_history_sizing);
}
if (p->m_events_statements_history_long_sizing < 0)
{
- p->m_events_statements_history_long_sizing= h->m_events_statements_history_long_sizing;
+ SYSVAR_AUTOSIZE(p->m_events_statements_history_long_sizing,
+ h->m_events_statements_history_long_sizing);
}
if (p->m_digest_sizing < 0)
{
- p->m_digest_sizing= h->m_digest_sizing;
+ SYSVAR_AUTOSIZE(p->m_digest_sizing,
+ h->m_digest_sizing);
}
if (p->m_session_connect_attrs_sizing < 0)
{
- p->m_session_connect_attrs_sizing= h->m_session_connect_attrs_sizing;
+ SYSVAR_AUTOSIZE(p->m_session_connect_attrs_sizing,
+ h->m_session_connect_attrs_sizing);
}
if (p->m_mutex_sizing < 0)
@@ -279,7 +293,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
+ handle * mutex_per_handle
+ share * mutex_per_share;
- p->m_mutex_sizing= apply_load_factor(count, h->m_load_factor_volatile);
+ SYSVAR_AUTOSIZE(p->m_mutex_sizing,
+ apply_load_factor(count, h->m_load_factor_volatile));
}
if (p->m_rwlock_sizing < 0)
@@ -289,7 +304,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
+ handle * rwlock_per_handle
+ share * rwlock_per_share;
- p->m_rwlock_sizing= apply_load_factor(count, h->m_load_factor_volatile);
+ SYSVAR_AUTOSIZE(p->m_rwlock_sizing,
+ apply_load_factor(count, h->m_load_factor_volatile));
}
if (p->m_cond_sizing < 0)
@@ -300,7 +316,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
+ handle * cond_per_handle
+ share * cond_per_share;
- p->m_cond_sizing= apply_load_factor(count, h->m_load_factor_volatile);
+ SYSVAR_AUTOSIZE(p->m_cond_sizing,
+ apply_load_factor(count, h->m_load_factor_volatile));
}
if (p->m_file_sizing < 0)
@@ -311,7 +328,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
+ share * file_per_share;
count= max<ulong>(count, file);
- p->m_file_sizing= apply_load_factor(count, h->m_load_factor_normal);
+ SYSVAR_AUTOSIZE(p->m_file_sizing,
+ apply_load_factor(count, h->m_load_factor_normal));
}
if (p->m_socket_sizing < 0)
@@ -321,7 +339,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
+ handle * socket_per_handle
+ share * socket_per_share;
- p->m_socket_sizing= apply_load_factor(count, h->m_load_factor_volatile);
+ SYSVAR_AUTOSIZE(p->m_socket_sizing,
+ apply_load_factor(count, h->m_load_factor_volatile));
}
if (p->m_thread_sizing < 0)
@@ -331,7 +350,8 @@ static void apply_heuristic(PFS_global_param *p, PFS_sizing_data *h)
+ handle * thread_per_handle
+ share * thread_per_share;
- p->m_thread_sizing= apply_load_factor(count, h->m_load_factor_volatile);
+ SYSVAR_AUTOSIZE(p->m_thread_sizing,
+ apply_load_factor(count, h->m_load_factor_volatile));
}
}
diff --git a/storage/perfschema/unittest/stub_server_misc.h b/storage/perfschema/unittest/stub_server_misc.h
index 946da533727..6bf7d0219ae 100644
--- a/storage/perfschema/unittest/stub_server_misc.h
+++ b/storage/perfschema/unittest/stub_server_misc.h
@@ -26,3 +26,8 @@ extern "C" void compute_md5_hash(char *, const char *, int)
{
}
+struct sys_var { enum where { AUTO }; };
+void mark_sys_var_value_origin(void *ptr, enum sys_var::where here)
+{
+}
+