summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/pfs_engine_table.cc23
-rw-r--r--storage/perfschema/table_accounts.cc2
-rw-r--r--storage/perfschema/table_esgs_by_account_by_event_name.cc2
-rw-r--r--storage/perfschema/table_esgs_by_host_by_event_name.cc2
-rw-r--r--storage/perfschema/table_esms_by_account_by_event_name.cc2
-rw-r--r--storage/perfschema/table_esms_by_host_by_event_name.cc2
-rw-r--r--storage/perfschema/table_ews_by_account_by_event_name.cc2
-rw-r--r--storage/perfschema/table_ews_by_host_by_event_name.cc2
-rw-r--r--storage/perfschema/table_hosts.cc2
-rw-r--r--storage/perfschema/table_setup_actors.cc4
-rw-r--r--storage/perfschema/table_threads.cc2
11 files changed, 19 insertions, 26 deletions
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc
index b9f79fa61d6..3c8d18826f5 100644
--- a/storage/perfschema/pfs_engine_table.cc
+++ b/storage/perfschema/pfs_engine_table.cc
@@ -364,17 +364,15 @@ ha_rows PFS_engine_table_share::get_row_count(void) const
int PFS_engine_table_share::write_row(TABLE *table, const unsigned char *buf,
Field **fields) const
{
- my_bitmap_map *org_bitmap;
-
if (m_write_row == NULL)
{
return HA_ERR_WRONG_COMMAND;
}
/* We internally read from Fields to support the write interface */
- org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
+ MY_BITMAP *org_bitmap= dbug_tmp_use_all_columns(table, &table->read_set);
int result= m_write_row(table, buf, fields);
- dbug_tmp_restore_column_map(table->read_set, org_bitmap);
+ dbug_tmp_restore_column_map(&table->read_set, org_bitmap);
return result;
}
@@ -432,7 +430,6 @@ int PFS_engine_table::read_row(TABLE *table,
unsigned char *buf,
Field **fields)
{
- my_bitmap_map *org_bitmap;
Field *f;
Field **fields_reset;
@@ -440,7 +437,7 @@ int PFS_engine_table::read_row(TABLE *table,
bool read_all= !bitmap_is_clear_all(table->write_set);
/* We internally write to Fields to support the read interface */
- org_bitmap= dbug_tmp_use_all_columns(table, table->write_set);
+ MY_BITMAP *org_bitmap= dbug_tmp_use_all_columns(table, &table->write_set);
/*
Some callers of the storage engine interface do not honor the
@@ -452,7 +449,7 @@ int PFS_engine_table::read_row(TABLE *table,
f->reset();
int result= read_row_values(table, buf, fields, read_all);
- dbug_tmp_restore_column_map(table->write_set, org_bitmap);
+ dbug_tmp_restore_column_map(&table->write_set, org_bitmap);
return result;
}
@@ -470,12 +467,10 @@ int PFS_engine_table::update_row(TABLE *table,
const unsigned char *new_buf,
Field **fields)
{
- my_bitmap_map *org_bitmap;
-
/* We internally read from Fields to support the write interface */
- org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
+ MY_BITMAP *org_bitmap= dbug_tmp_use_all_columns(table, &table->read_set);
int result= update_row_values(table, old_buf, new_buf, fields);
- dbug_tmp_restore_column_map(table->read_set, org_bitmap);
+ dbug_tmp_restore_column_map(&table->read_set, org_bitmap);
return result;
}
@@ -484,12 +479,10 @@ int PFS_engine_table::delete_row(TABLE *table,
const unsigned char *buf,
Field **fields)
{
- my_bitmap_map *org_bitmap;
-
/* We internally read from Fields to support the delete interface */
- org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
+ MY_BITMAP *org_bitmap= dbug_tmp_use_all_columns(table, &table->read_set);
int result= delete_row_values(table, buf, fields);
- dbug_tmp_restore_column_map(table->read_set, org_bitmap);
+ dbug_tmp_restore_column_map(&table->read_set, org_bitmap);
return result;
}
diff --git a/storage/perfschema/table_accounts.cc b/storage/perfschema/table_accounts.cc
index eb3f6481696..310c81f26b3 100644
--- a/storage/perfschema/table_accounts.cc
+++ b/storage/perfschema/table_accounts.cc
@@ -46,7 +46,7 @@ table_accounts::m_share=
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE accounts("
"USER CHAR(" USERNAME_CHAR_LENGTH_STR ") collate utf8_bin default null,"
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" HOSTNAME_LENGTH_STR ") collate utf8_bin default null,"
"CURRENT_CONNECTIONS bigint not null,"
"TOTAL_CONNECTIONS bigint not null)") },
false /* perpetual */
diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.cc b/storage/perfschema/table_esgs_by_account_by_event_name.cc
index 68b7b2f57e2..42bef1aa4de 100644
--- a/storage/perfschema/table_esgs_by_account_by_event_name.cc
+++ b/storage/perfschema/table_esgs_by_account_by_event_name.cc
@@ -51,7 +51,7 @@ table_esgs_by_account_by_event_name::m_share=
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_by_account_by_event_name("
"USER CHAR(" USERNAME_CHAR_LENGTH_STR ") collate utf8_bin default null,"
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" HOSTNAME_LENGTH_STR ") collate utf8_bin default null,"
"EVENT_NAME VARCHAR(128) not null,"
"COUNT_STAR BIGINT unsigned not null,"
"SUM_TIMER_WAIT BIGINT unsigned not null,"
diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.cc b/storage/perfschema/table_esgs_by_host_by_event_name.cc
index 1d3f6126862..ebacdc6e5b0 100644
--- a/storage/perfschema/table_esgs_by_host_by_event_name.cc
+++ b/storage/perfschema/table_esgs_by_host_by_event_name.cc
@@ -51,7 +51,7 @@ table_esgs_by_host_by_event_name::m_share=
sizeof(pos_esgs_by_host_by_event_name),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_by_host_by_event_name("
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" STRINGIFY_ARG(HOSTNAME_LENGTH) ") collate utf8_bin default null,"
"EVENT_NAME VARCHAR(128) not null,"
"COUNT_STAR BIGINT unsigned not null,"
"SUM_TIMER_WAIT BIGINT unsigned not null,"
diff --git a/storage/perfschema/table_esms_by_account_by_event_name.cc b/storage/perfschema/table_esms_by_account_by_event_name.cc
index 09b872e8ecb..589f62b9eca 100644
--- a/storage/perfschema/table_esms_by_account_by_event_name.cc
+++ b/storage/perfschema/table_esms_by_account_by_event_name.cc
@@ -51,7 +51,7 @@ table_esms_by_account_by_event_name::m_share=
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_account_by_event_name("
"USER CHAR(" USERNAME_CHAR_LENGTH_STR ") collate utf8_bin default null,"
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" HOSTNAME_LENGTH_STR ") collate utf8_bin default null,"
"EVENT_NAME VARCHAR(128) not null,"
"COUNT_STAR BIGINT unsigned not null,"
"SUM_TIMER_WAIT BIGINT unsigned not null,"
diff --git a/storage/perfschema/table_esms_by_host_by_event_name.cc b/storage/perfschema/table_esms_by_host_by_event_name.cc
index c77f5f1320f..f5f6372d7e7 100644
--- a/storage/perfschema/table_esms_by_host_by_event_name.cc
+++ b/storage/perfschema/table_esms_by_host_by_event_name.cc
@@ -51,7 +51,7 @@ table_esms_by_host_by_event_name::m_share=
sizeof(pos_esms_by_host_by_event_name),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_host_by_event_name("
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" STRINGIFY_ARG(HOSTNAME_LENGTH) ") collate utf8_bin default null,"
"EVENT_NAME VARCHAR(128) not null,"
"COUNT_STAR BIGINT unsigned not null,"
"SUM_TIMER_WAIT BIGINT unsigned not null,"
diff --git a/storage/perfschema/table_ews_by_account_by_event_name.cc b/storage/perfschema/table_ews_by_account_by_event_name.cc
index 062450f3dbf..05c874eab88 100644
--- a/storage/perfschema/table_ews_by_account_by_event_name.cc
+++ b/storage/perfschema/table_ews_by_account_by_event_name.cc
@@ -51,7 +51,7 @@ table_ews_by_account_by_event_name::m_share=
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_account_by_event_name("
"USER CHAR(" USERNAME_CHAR_LENGTH_STR ") collate utf8_bin default null,"
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" HOSTNAME_LENGTH_STR ") collate utf8_bin default null,"
"EVENT_NAME VARCHAR(128) not null,"
"COUNT_STAR BIGINT unsigned not null,"
"SUM_TIMER_WAIT BIGINT unsigned not null,"
diff --git a/storage/perfschema/table_ews_by_host_by_event_name.cc b/storage/perfschema/table_ews_by_host_by_event_name.cc
index 25f0edc900c..129709b8c72 100644
--- a/storage/perfschema/table_ews_by_host_by_event_name.cc
+++ b/storage/perfschema/table_ews_by_host_by_event_name.cc
@@ -51,7 +51,7 @@ table_ews_by_host_by_event_name::m_share=
sizeof(pos_ews_by_host_by_event_name),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_host_by_event_name("
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" STRINGIFY_ARG(HOSTNAME_LENGTH) ") collate utf8_bin default null,"
"EVENT_NAME VARCHAR(128) not null,"
"COUNT_STAR BIGINT unsigned not null,"
"SUM_TIMER_WAIT BIGINT unsigned not null,"
diff --git a/storage/perfschema/table_hosts.cc b/storage/perfschema/table_hosts.cc
index 8d8b6201ec8..8e71bfc69bf 100644
--- a/storage/perfschema/table_hosts.cc
+++ b/storage/perfschema/table_hosts.cc
@@ -46,7 +46,7 @@ table_hosts::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE hosts("
- "HOST CHAR(60) collate utf8_bin default null,"
+ "HOST CHAR(" STRINGIFY_ARG(HOSTNAME_LENGTH) ") collate utf8_bin default null,"
"CURRENT_CONNECTIONS bigint not null,"
"TOTAL_CONNECTIONS bigint not null)") },
false /* perpetual */
diff --git a/storage/perfschema/table_setup_actors.cc b/storage/perfschema/table_setup_actors.cc
index dae9c80e6eb..e17bf3121da 100644
--- a/storage/perfschema/table_setup_actors.cc
+++ b/storage/perfschema/table_setup_actors.cc
@@ -50,9 +50,9 @@ table_setup_actors::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE setup_actors("
- "HOST CHAR(60) collate utf8_bin default '%' not null,"
+ "HOST CHAR(" HOSTNAME_LENGTH_STR ") collate utf8_bin default '%' not null,"
"USER CHAR(" USERNAME_CHAR_LENGTH_STR ") collate utf8_bin default '%' not null,"
- "ROLE CHAR(16) collate utf8_bin default '%' not null,"
+ "ROLE CHAR(" USERNAME_CHAR_LENGTH_STR ") collate utf8_bin default '%' not null,"
"ENABLED ENUM('YES', 'NO') not null default 'YES',"
"HISTORY ENUM('YES', 'NO') not null default 'YES')") },
false /* perpetual */
diff --git a/storage/perfschema/table_threads.cc b/storage/perfschema/table_threads.cc
index 37bb6fd074a..a752902c787 100644
--- a/storage/perfschema/table_threads.cc
+++ b/storage/perfschema/table_threads.cc
@@ -46,7 +46,7 @@ table_threads::m_share=
"TYPE VARCHAR(10) not null,"
"PROCESSLIST_ID BIGINT unsigned,"
"PROCESSLIST_USER VARCHAR(" USERNAME_CHAR_LENGTH_STR "),"
- "PROCESSLIST_HOST VARCHAR(60),"
+ "PROCESSLIST_HOST VARCHAR(" HOSTNAME_LENGTH_STR "),"
"PROCESSLIST_DB VARCHAR(64),"
"PROCESSLIST_COMMAND VARCHAR(16),"
"PROCESSLIST_TIME BIGINT,"