3264 cpowers 2011-03-18 [merge]
merge
modified:
include/mysql/psi/psi_abi_v1.h.pp
=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h 2011-03-18 22:24:30 +0000
+++ b/include/mysql/psi/psi.h 2011-03-19 01:36:46 +0000
@@ -275,9 +275,9 @@ enum PSI_table_lock_operation
enum PSI_socket_state
{
/** Idle, waiting for the next command. */
- PSI_SOCKET_STATE_IDLE= 0,
+ PSI_SOCKET_STATE_IDLE= 1,
/** Active, executing a command. */
- PSI_SOCKET_STATE_ACTIVE= 1
+ PSI_SOCKET_STATE_ACTIVE= 2
};
/** Operation performed on an instrumented socket. */
=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql 2011-03-18 23:37:18 +0000
+++ b/scripts/mysql_system_tables.sql 2011-03-19 01:36:46 +0000
@@ -383,10 +383,11 @@ DROP PREPARE stmt;
SET @cmd="CREATE TABLE performance_schema.socket_instances("
"EVENT_NAME VARCHAR(128) not null,"
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
- "THREAD_ID INTEGER not null,"
+ "THREAD_ID INTEGER,"
"SOCKET_ID INTEGER not null,"
"IP VARCHAR(64) not null,"
- "PORT INTEGER not null"
+ "PORT INTEGER not null,"
+ "STATE ENUM('IDLE','ACTIVE') not null"
")ENGINE=PERFORMANCE_SCHEMA;";
SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0');
=== modified file 'storage/perfschema/table_socket_instances.cc'
--- a/storage/perfschema/table_socket_instances.cc 2011-03-18 22:24:30 +0000
+++ b/storage/perfschema/table_socket_instances.cc 2011-03-19 01:36:46 +0000
@@ -59,12 +59,17 @@ static const TABLE_FIELD_TYPE field_type
{ C_STRING_WITH_LEN("PORT") },
{ C_STRING_WITH_LEN("int(11)") },
{ NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("STATE") },
+ { C_STRING_WITH_LEN("enum('IDLE','ACTIVE')") },
+ { NULL, 0}
}
};
TABLE_FIELD_DEF
table_socket_instances::m_field_def=
-{ 6, field_types };
+{ 7, field_types };
PFS_engine_table_share
table_socket_instances::m_share=
@@ -155,7 +160,8 @@ void table_socket_instances::make_row(PF
m_row.m_event_name_length= safe_class->m_name_length;
m_row.m_identity= pfs->m_identity;
m_row.m_fd= pfs->m_fd;
-
+ m_row.m_state= (pfs->m_idle ? PSI_SOCKET_STATE_IDLE
+ : PSI_SOCKET_STATE_ACTIVE);
PFS_thread *safe_thread= sanitize_thread(pfs->m_thread_owner);
if (safe_thread != NULL)
@@ -208,6 +214,9 @@ int table_socket_instances::read_row_val
case 5: /* PORT */
set_field_ulong(f, m_row.m_port);
break;
+ case 6: /* STATE */
+ set_field_enum(f, m_row.m_state);
+ break;
default:
DBUG_ASSERT(false);
}
=== modified file 'storage/perfschema/table_socket_instances.h'
--- a/storage/perfschema/table_socket_instances.h 2011-03-18 19:05:00 +0000
+++ b/storage/perfschema/table_socket_instances.h 2011-03-19 01:36:46 +0000
@@ -50,6 +50,8 @@ struct row_socket_instances
uint m_ip_length;
/** Column PORT */
uint m_port;
+ /** Socket state: ACTIVE or IDLE */
+ PSI_socket_state m_state;
row_socket_instances() {m_thread_id= false;}
};
Attachment: [text/bzr-bundle] bzr/cpowers@tma-1-20110319014219-hua2dkcxl5mnayke.bundle
| Thread |
|---|
| • bzr push into mysql-trunk branch (chris.powers:3264) | Christopher Powers | 19 Mar |