List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:May 31 2012 4:47am
Subject:bzr push into mysql-trunk branch (chris.powers:3925 to 3927) Bug#14076427
View as plain text  
 3927 Christopher Powers	2012-05-30
      Bug#14076427 - USE SERVER SYSTEM VARIABLES FOR CONNECT STRING PROCESSING
      
      Additional test case updates

    modified:
      mysql-test/suite/perfschema/r/start_server_disable_waits.result
      mysql-test/suite/perfschema/r/start_server_innodb.result
 3926 Christopher Powers	2012-05-30
      Bug#14076427 - USE SERVER SYSTEM VARIABLES FOR CONNECT STRING PROCESSING
      
      Changes per code review
      
      1. Updated perfschema.start_server_* tests
      2. Free session connect attrs memory during cleanup
      3. Added perfschema.start_server_no_session_connect_attr.test
      4. Added sys_vars.pfs_session_connect_attrs.test
      5. Updated OOM unit tests
      6. Adjusted SHOW ENGINE STATUS memory count, avoid debug assert

    added:
      mysql-test/suite/perfschema/r/start_server_no_session_connect_attrs.result
      mysql-test/suite/perfschema/t/start_server_no_session_connect_attrs.test
      mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result
      mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test
    modified:
      mysql-test/r/mysqld--help-win.result
      mysql-test/suite/perfschema/r/start_server_disable_idle.result
      mysql-test/suite/perfschema/r/start_server_disable_stages.result
      mysql-test/suite/perfschema/r/start_server_disable_statements.result
      mysql-test/suite/perfschema/r/start_server_no_account.result
      mysql-test/suite/perfschema/r/start_server_no_cond_class.result
      mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
      mysql-test/suite/perfschema/r/start_server_no_file_class.result
      mysql-test/suite/perfschema/r/start_server_no_file_inst.result
      mysql-test/suite/perfschema/r/start_server_no_host.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_socket_class.result
      mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
      mysql-test/suite/perfschema/r/start_server_no_stage_class.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_statement_class.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
      mysql-test/suite/perfschema/r/start_server_no_table_inst.result
      mysql-test/suite/perfschema/r/start_server_no_thread_class.result
      mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
      mysql-test/suite/perfschema/r/start_server_no_user.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
      mysql-test/suite/perfschema/r/start_server_nothing.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/t/start_server_nothing-master.opt
      mysql-test/suite/perfschema/t/start_server_nothing.test
      mysql-test/suite/sys_vars/t/pfs_digests_size_basic-master.opt
      sql/sys_vars.cc
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_server.h
      storage/perfschema/table_session_connect.cc
      storage/perfschema/unittest/pfs_account-oom-t.cc
      storage/perfschema/unittest/pfs_host-oom-t.cc
      storage/perfschema/unittest/pfs_instr-oom-t.cc
 3925 Christopher Powers	2012-05-30
      Bug#14076427 - USE SERVER SYSTEM VARIABLES FOR CONNECT STRING PROCESSING
      
      1. Per-thread connection attribute storage size is now defined as a read-only system variable
      2. Dropped/truncated attributes are now tracked by a global counter, connect_attrs_lost
      3. Verified column widths in the SESSION_CONNECT tables

    modified:
      mysql-test/suite/sys_vars/r/all_vars.result
      sql/sys_vars.cc
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_server.h
=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/r/mysqld--help-win.result	2012-05-31 04:41:07 +0000
@@ -588,6 +588,8 @@ The following options may be given as th
  Maximum number of thread instruments.
  --performance-schema-max-thread-instances=# 
  Maximum number of instrumented threads.
+ --performance-schema-session-connect-attrs-size=# 
+ Size of session attribute string buffer per thread.
  --performance-schema-setup-actors-size=# 
  Maximum number of rows in SETUP_ACTORS.
  --performance-schema-setup-objects-size=# 
@@ -1123,6 +1125,7 @@ performance-schema-max-table-handles 100
 performance-schema-max-table-instances 1000
 performance-schema-max-thread-classes 50
 performance-schema-max-thread-instances 1000
+performance-schema-session-connect-attrs-size 2048
 performance-schema-setup-actors-size 100
 performance-schema-setup-objects-size 100
 performance-schema-users-size 100

=== modified file 'mysql-test/suite/perfschema/r/start_server_disable_idle.result'
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_disable_stages.result'
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_disable_statements.result'
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_disable_waits.result'
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result	2012-05-31 04:46:23 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_innodb.result'
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result	2012-05-31 04:46:23 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100
@@ -115,6 +116,7 @@ Performance_schema_mutex_classes_lost	0
 Performance_schema_mutex_instances_lost	0
 Performance_schema_rwlock_classes_lost	0
 Performance_schema_rwlock_instances_lost	0
+Performance_schema_session_connect_attrs_lost	0
 Performance_schema_socket_classes_lost	0
 Performance_schema_socket_instances_lost	0
 Performance_schema_stage_classes_lost	0

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_account.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_cond_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_cond_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_file_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_file_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_host.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_mutex_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== added file 'mysql-test/suite/perfschema/r/start_server_no_session_connect_attrs.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_session_connect_attrs.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_session_connect_attrs.result	2012-05-31 04:41:07 +0000
@@ -0,0 +1,9 @@
+SELECT COUNT(*) from performance_schema.session_account_connect_attrs;
+COUNT(*)
+0
+SELECT COUNT(*) from performance_schema.session_connect_attrs;
+COUNT(*)
+0
+SHOW VARIABLES LIKE "performance_schema_session_connect_attrs_size";
+Variable_name	Value
+performance_schema_session_connect_attrs_size	0

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_setup_actors.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	0
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_setup_objects.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	0
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_socket_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_socket_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_stage_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_stages_history.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_statement_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result	2012-02-28 14:40:36 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_statements_history.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_table_hdl.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	0
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_table_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	0
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_thread_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	0
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_thread_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	0
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_user.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	0

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_waits_history.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100

=== modified file 'mysql-test/suite/perfschema/r/start_server_nothing.result'
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result	2012-02-28 14:40:36 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	0
 performance_schema_max_table_instances	0
 performance_schema_max_thread_classes	0
 performance_schema_max_thread_instances	0
+performance_schema_session_connect_attrs_size	0
 performance_schema_setup_actors_size	0
 performance_schema_setup_objects_size	0
 performance_schema_users_size	0
@@ -129,6 +130,7 @@ performance_schema_max_table_handles	0
 performance_schema_max_table_instances	0
 performance_schema_max_thread_classes	0
 performance_schema_max_thread_instances	0
+performance_schema_session_connect_attrs_size	0
 performance_schema_setup_actors_size	0
 performance_schema_setup_objects_size	0
 performance_schema_users_size	0
@@ -227,6 +229,10 @@ select * from performance_schema.file_su
 EVENT_NAME	COUNT_STAR	SUM_TIMER_WAIT	MIN_TIMER_WAIT	AVG_TIMER_WAIT	MAX_TIMER_WAIT	COUNT_READ	SUM_TIMER_READ	MIN_TIMER_READ	AVG_TIMER_READ	MAX_TIMER_READ	SUM_NUMBER_OF_BYTES_READ	COUNT_WRITE	SUM_TIMER_WRITE	MIN_TIMER_WRITE	AVG_TIMER_WRITE	MAX_TIMER_WRITE	SUM_NUMBER_OF_BYTES_WRITE	COUNT_MISC	SUM_TIMER_MISC	MIN_TIMER_MISC	AVG_TIMER_MISC	MAX_TIMER_MISC
 select * from performance_schema.file_summary_by_instance;
 FILE_NAME	EVENT_NAME	OBJECT_INSTANCE_BEGIN	COUNT_STAR	SUM_TIMER_WAIT	MIN_TIMER_WAIT	AVG_TIMER_WAIT	MAX_TIMER_WAIT	COUNT_READ	SUM_TIMER_READ	MIN_TIMER_READ	AVG_TIMER_READ	MAX_TIMER_READ	SUM_NUMBER_OF_BYTES_READ	COUNT_WRITE	SUM_TIMER_WRITE	MIN_TIMER_WRITE	AVG_TIMER_WRITE	MAX_TIMER_WRITE	SUM_NUMBER_OF_BYTES_WRITE	COUNT_MISC	SUM_TIMER_MISC	MIN_TIMER_MISC	AVG_TIMER_MISC	MAX_TIMER_MISC
+select * from performance_schema.session_account_connect_attrs;
+PROCESSLIST_ID	ATTR_NAME	ATTR_VALUE	ORDINAL_POSITION
+select * from performance_schema.session_connect_attrs;
+PROCESSLIST_ID	ATTR_NAME	ATTR_VALUE	ORDINAL_POSITION
 select * from performance_schema.socket_instances;
 EVENT_NAME	OBJECT_INSTANCE_BEGIN	THREAD_ID	SOCKET_ID	IP	PORT	STATE
 select * from performance_schema.socket_summary_by_instance;

=== modified file 'mysql-test/suite/perfschema/r/start_server_off.result'
--- a/mysql-test/suite/perfschema/r/start_server_off.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_off.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100
@@ -115,6 +116,7 @@ Performance_schema_mutex_classes_lost	0
 Performance_schema_mutex_instances_lost	0
 Performance_schema_rwlock_classes_lost	0
 Performance_schema_rwlock_instances_lost	0
+Performance_schema_session_connect_attrs_lost	0
 Performance_schema_socket_classes_lost	0
 Performance_schema_socket_instances_lost	0
 Performance_schema_stage_classes_lost	0

=== modified file 'mysql-test/suite/perfschema/r/start_server_on.result'
--- a/mysql-test/suite/perfschema/r/start_server_on.result	2012-05-28 09:09:33 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_on.result	2012-05-31 04:41:07 +0000
@@ -95,6 +95,7 @@ performance_schema_max_table_handles	100
 performance_schema_max_table_instances	500
 performance_schema_max_thread_classes	50
 performance_schema_max_thread_instances	200
+performance_schema_session_connect_attrs_size	2048
 performance_schema_setup_actors_size	100
 performance_schema_setup_objects_size	100
 performance_schema_users_size	100
@@ -115,6 +116,7 @@ Performance_schema_mutex_classes_lost	0
 Performance_schema_mutex_instances_lost	0
 Performance_schema_rwlock_classes_lost	0
 Performance_schema_rwlock_instances_lost	0
+Performance_schema_session_connect_attrs_lost	0
 Performance_schema_socket_classes_lost	0
 Performance_schema_socket_instances_lost	0
 Performance_schema_stage_classes_lost	0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_session_connect_attrs.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_session_connect_attrs.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_session_connect_attrs.test	2012-05-31 04:41:07 +0000
@@ -0,0 +1,15 @@
+# --------------------------------------------------------------
+# Tests for the performance schema session connection attributes
+# --------------------------------------------------------------
+
+# Test case to show behavior of session connection attributes when
+# session-connect-attrs is 0
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+SELECT COUNT(*) from performance_schema.session_account_connect_attrs;
+SELECT COUNT(*) from performance_schema.session_connect_attrs;
+
+SHOW VARIABLES LIKE "performance_schema_session_connect_attrs_size";
+

=== modified file 'mysql-test/suite/perfschema/t/start_server_nothing-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_nothing-master.opt	2011-08-11 03:11:58 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_nothing-master.opt	2012-05-31 04:41:07 +0000
@@ -35,3 +35,5 @@
 --loose-performance_schema_events_statements_history_long_size=0
 --loose-performance_schema_events_statements_history_size=0
 
+--loose-performance_schema_session_connect_attrs=0
+

=== modified file 'mysql-test/suite/perfschema/t/start_server_nothing.test'
--- a/mysql-test/suite/perfschema/t/start_server_nothing.test	2011-10-19 21:49:22 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_nothing.test	2012-05-31 04:41:07 +0000
@@ -44,6 +44,8 @@ select * from performance_schema.events_
 select * from performance_schema.file_instances;
 select * from performance_schema.file_summary_by_event_name;
 select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
 select * from performance_schema.socket_instances;
 select * from performance_schema.socket_summary_by_instance;
 select * from performance_schema.socket_summary_by_event_name;

=== added file 'mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result	2012-05-31 04:41:07 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_session_connect_attrs_size;
+@@global.performance_schema_session_connect_attrs_size
+1024
+select @@session.performance_schema_session_connect_attrs_size;
+ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a GLOBAL variable
+show global variables like 'performance_schema_session_connect_attrs_size';
+Variable_name	Value
+performance_schema_session_connect_attrs_size	1024
+show session variables like 'performance_schema_session_connect_attrs_size';
+Variable_name	Value
+performance_schema_session_connect_attrs_size	1024
+select * from information_schema.global_variables
+where variable_name='performance_schema_session_connect_attrs_size';
+VARIABLE_NAME	VARIABLE_VALUE
+PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE	1024
+select * from information_schema.session_variables
+where variable_name='performance_schema_session_connect_attrs_size';
+VARIABLE_NAME	VARIABLE_VALUE
+PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE	1024
+set global performance_schema_session_connect_attrs_size=1;
+ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a read only variable
+set session performance_schema_session_connect_attrs_size=1;
+ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a read only variable

=== modified file 'mysql-test/suite/sys_vars/t/pfs_digests_size_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_digests_size_basic-master.opt	2012-03-19 11:14:55 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_digests_size_basic-master.opt	2012-05-31 04:41:07 +0000
@@ -1,2 +1,2 @@
 --loose-enable-performance-schema
---loose-performance-schema-digests-size=123
+--loose-performance-schema-session-connect-attrs-size=123

=== added file 'mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test	2012-05-31 04:41:07 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2012 Sun Microsystems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_session_connect_attrs_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_session_connect_attrs_size;
+
+show global variables like 'performance_schema_session_connect_attrs_size';
+
+show session variables like 'performance_schema_session_connect_attrs_size';
+
+select * from information_schema.global_variables
+  where variable_name='performance_schema_session_connect_attrs_size';
+
+select * from information_schema.session_variables
+  where variable_name='performance_schema_session_connect_attrs_size';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_session_connect_attrs_size=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_session_connect_attrs_size=1;
+

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2012-05-30 18:10:33 +0000
+++ b/sql/sys_vars.cc	2012-05-31 04:41:07 +0000
@@ -497,11 +497,11 @@ static Sys_var_ulong Sys_pfs_digest_size
        BLOCK_SIZE(1), PFS_TRAILING_PROPERTIES);
 
 static Sys_var_ulong Sys_pfs_connect_attrs_size(
-       "performance_schema_connect_attrs_size",
-       "Size of connection attribute string buffer per thread.",
-       READ_ONLY GLOBAL_VAR(pfs_param.m_connect_attrs_sizing),
+       "performance_schema_session_connect_attrs_size",
+       "Size of session attribute string buffer per thread.",
+       READ_ONLY GLOBAL_VAR(pfs_param.m_session_connect_attrs_sizing),
        CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 1024 * 1024),
-       DEFAULT(PFS_CONNECT_ATTRS_SIZE),
+       DEFAULT(PFS_SESSION_CONNECT_ATTRS_SIZE),
        BLOCK_SIZE(1), PFS_TRAILING_PROPERTIES);
 
 #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */

=== modified file 'storage/perfschema/ha_perfschema.cc'
--- a/storage/perfschema/ha_perfschema.cc	2012-05-30 18:10:33 +0000
+++ b/storage/perfschema/ha_perfschema.cc	2012-05-31 04:41:07 +0000
@@ -166,8 +166,8 @@ static struct st_mysql_show_var pfs_stat
     (char*) &statement_class_lost, SHOW_LONG},
   {"Performance_schema_digest_lost",
     (char*) &digest_lost, SHOW_LONG},
-  {"Performance_schema_connect_attrs_lost",
-    (char*) &connect_attrs_lost, SHOW_LONG},
+  {"Performance_schema_session_connect_attrs_lost",
+    (char*) &session_connect_attrs_lost, SHOW_LONG},
   {NullS, NullS, SHOW_LONG}
 };
 

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2012-05-30 18:10:33 +0000
+++ b/storage/perfschema/pfs.cc	2012-05-31 04:41:07 +0000
@@ -4931,22 +4931,22 @@ static int set_thread_connect_attrs_v1(c
 
   DBUG_ASSERT(buffer != NULL);
 
-  if (likely(thd != NULL))
+  if (likely(thd != NULL) && session_connect_attrs_size_per_thread > 0)
   {
     /* copy from the input buffer as much as we can fit */
-    uint copy_size= (uint)(length < connect_attrs_size_per_thread ?
-                           length : connect_attrs_size_per_thread);
+    uint copy_size= (uint)(length < session_connect_attrs_size_per_thread ?
+                           length : session_connect_attrs_size_per_thread);
     thd->m_lock.allocated_to_dirty();
-    memcpy(thd->m_connect_attrs, buffer, copy_size);
-    thd->m_connect_attrs_length= copy_size;
-    thd->m_connect_attrs_cs= (const CHARSET_INFO *) from_cs;
+    memcpy(thd->m_session_connect_attrs, buffer, copy_size);
+    thd->m_session_connect_attrs_length= copy_size;
+    thd->m_session_connect_attrs_cs= (const CHARSET_INFO *) from_cs;
     thd->m_lock.dirty_to_allocated();
     
     if (copy_size == length)
       return 0;
     else
     {
-      connect_attrs_lost++;
+      session_connect_attrs_lost++;
       return 1;
     }
   }

=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc	2012-05-21 12:00:48 +0000
+++ b/storage/perfschema/pfs_engine_table.cc	2012-05-31 04:41:07 +0000
@@ -1335,68 +1335,73 @@ bool pfs_show_status(handlerton *hton, T
       size= digest_max * sizeof(PFS_statements_digest_stat);
       total_memory+= size;
       break;
-
     case 137:
+      name= "session_connect_attrs.memory";
+      size= thread_max * session_connect_attrs_size_per_thread;
+      total_memory+= size;
+      break;
+
+    case 138:
       name= "(account_hash).count";
       size= account_hash.count;
       break;
-    case 138:
+    case 139:
       name= "(account_hash).size";
       size= account_hash.size;
       break;
-    case 139:
+    case 140:
       name= "(digest_hash).count";
       size= digest_hash.count;
       break;
-    case 140:
+    case 141:
       name= "(digest_hash).size";
       size= digest_hash.size;
       break;
-    case 141:
+    case 142:
       name= "(filename_hash).count";
       size= filename_hash.count;
       break;
-    case 142:
+    case 143:
       name= "(filename_hash).size";
       size= filename_hash.size;
       break;
-    case 143:
+    case 144:
       name= "(host_hash).count";
       size= host_hash.count;
       break;
-    case 144:
+    case 145:
       name= "(host_hash).size";
       size= host_hash.size;
       break;
-    case 145:
+    case 146:
       name= "(setup_actor_hash).count";
       size= setup_actor_hash.count;
       break;
-    case 146:
+    case 147:
       name= "(setup_actor_hash).size";
       size= setup_actor_hash.size;
       break;
-    case 147:
+    case 148:
       name= "(setup_object_hash).count";
       size= setup_object_hash.count;
       break;
-    case 148:
+    case 149:
       name= "(setup_object_hash).size";
       size= setup_object_hash.size;
       break;
-    case 149:
+    case 150:
       name= "(table_share_hash).count";
       size= table_share_hash.count;
       break;
-    case 150:
+    case 151:
       name= "(table_share_hash).size";
       size= table_share_hash.size;
       break;
-    case 151:
+    case 152:
       name= "(user_hash).count";
       size= user_hash.count;
       break;
-    case 152:
+    case 153:
       name= "(user_hash).size";
       size= user_hash.size;
       break;
@@ -1405,7 +1410,7 @@ bool pfs_show_status(handlerton *hton, T
       This case must be last,
       for aggregation in total_memory.
     */
-    case 153:
+    case 154:
       name= "performance_schema.memory";
       size= total_memory;
       /* This will fail if something is not advertised here */

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2012-05-30 18:10:33 +0000
+++ b/storage/perfschema/pfs_instr.cc	2012-05-31 04:41:07 +0000
@@ -83,9 +83,9 @@ ulong locker_lost= 0;
 /** Number of statement lost. @sa STATEMENT_STACK_SIZE. */
 ulong statement_lost= 0;
 /** Size of connection attribute storage per thread */
-ulong connect_attrs_size_per_thread;
+ulong session_connect_attrs_size_per_thread;
 /** Number of connection attributes lost */
-ulong connect_attrs_lost;
+ulong session_connect_attrs_lost= 0;
 
 /**
   Mutex instrumentation instances array.
@@ -161,7 +161,7 @@ static PFS_events_waits *thread_waits_hi
 static PFS_events_stages *thread_stages_history_array= NULL;
 static PFS_events_statements *thread_statements_history_array= NULL;
 static PFS_events_statements *thread_statements_stack_array= NULL;
-static char *thread_connect_attrs_array= NULL;
+static char *thread_session_connect_attrs_array= NULL;
 
 /** Hash table for instrumented files. */
 LF_HASH filename_hash;
@@ -179,7 +179,7 @@ int init_instruments(const PFS_global_pa
   uint thread_stages_history_sizing;
   uint thread_statements_history_sizing;
   uint thread_statements_stack_sizing;
-  uint thread_connect_attrs_sizing;
+  uint thread_session_connect_attrs_sizing;
   uint index;
 
   /* Make sure init_event_name_sizing is called */
@@ -226,10 +226,10 @@ int init_instruments(const PFS_global_pa
   thread_instr_class_statements_sizing= param->m_thread_sizing
     * param->m_statement_class_sizing;
 
-  connect_attrs_size_per_thread= param->m_connect_attrs_sizing;
-  thread_connect_attrs_sizing= param->m_thread_sizing
-    * connect_attrs_size_per_thread;
-  connect_attrs_lost= 0;
+  session_connect_attrs_size_per_thread= param->m_session_connect_attrs_sizing;
+  thread_session_connect_attrs_sizing= param->m_thread_sizing
+    * session_connect_attrs_size_per_thread;
+  session_connect_attrs_lost= 0;
 
   mutex_array= NULL;
   rwlock_array= NULL;
@@ -376,11 +376,11 @@ int init_instruments(const PFS_global_pa
       thread_instr_class_statements_array[index].reset();
   }
 
-  if (thread_connect_attrs_sizing > 0)
+  if (thread_session_connect_attrs_sizing > 0)
   {
-    thread_connect_attrs_array=
-      (char *)pfs_malloc(thread_connect_attrs_sizing, MYF(MY_ZEROFILL));
-    if (unlikely(thread_connect_attrs_array == NULL))
+    thread_session_connect_attrs_array=
+      (char *)pfs_malloc(thread_session_connect_attrs_sizing, MYF(MY_ZEROFILL));
+    if (unlikely(thread_session_connect_attrs_array == NULL))
       return 1;
   }
 
@@ -400,8 +400,8 @@ int init_instruments(const PFS_global_pa
       &thread_statements_stack_array[index * statement_stack_max];
     thread_array[index].m_instr_class_statements_stats=
       &thread_instr_class_statements_array[index * statement_class_max];
-    thread_array[index].m_connect_attrs=
-      &thread_connect_attrs_array[index * connect_attrs_size_per_thread];
+    thread_array[index].m_session_connect_attrs=
+      &thread_session_connect_attrs_array[index * session_connect_attrs_size_per_thread];
   }
 
   if (wait_class_max > 0)
@@ -486,6 +486,8 @@ void cleanup_instruments(void)
   global_instr_class_stages_array= NULL;
   pfs_free(global_instr_class_statements_array);
   global_instr_class_statements_array= NULL;
+  pfs_free(thread_session_connect_attrs_array);
+  thread_session_connect_attrs_array=NULL;
 }
 
 C_MODE_START

=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h	2012-05-30 18:10:33 +0000
+++ b/storage/perfschema/pfs_instr.h	2012-05-31 04:41:07 +0000
@@ -515,11 +515,11 @@ struct PFS_ALIGNED PFS_thread : PFS_conn
   PFS_account *m_account;
 
   /** a buffer for the connection attributes */
-  char *m_connect_attrs;
+  char *m_session_connect_attrs;
   /** length used by @c m_connect_attrs */
-  uint m_connect_attrs_length;
+  uint m_session_connect_attrs_length;
   /** character set in which @c m_connect_attrs are encoded */
-  const CHARSET_INFO *m_connect_attrs_cs;
+  const CHARSET_INFO *m_session_connect_attrs_cs;
 };
 
 extern PFS_single_stat *global_instr_class_waits_array;
@@ -584,8 +584,8 @@ extern ulong events_stages_history_per_t
 extern ulong events_statements_history_per_thread;
 extern ulong locker_lost;
 extern ulong statement_lost;
-extern ulong connect_attrs_lost;
-extern ulong connect_attrs_size_per_thread;
+extern ulong session_connect_attrs_lost;
+extern ulong session_connect_attrs_size_per_thread;
 
 /* Exposing the data directly, for iterators. */
 

=== modified file 'storage/perfschema/pfs_server.h'
--- a/storage/perfschema/pfs_server.h	2012-05-30 18:10:33 +0000
+++ b/storage/perfschema/pfs_server.h	2012-05-31 04:41:07 +0000
@@ -109,7 +109,7 @@
   #define PFS_DIGEST_SIZE 200
 #endif
 #ifndef PFS_CONNECT_ATTRS_SIZE
-  #define PFS_CONNECT_ATTRS_SIZE 1024
+  #define PFS_SESSION_CONNECT_ATTRS_SIZE 2048
 #endif
 
 
@@ -245,8 +245,8 @@ struct PFS_global_param
   ulong m_events_statements_history_long_sizing;
   /** Maximum number of digests to be captured */
   ulong m_digest_sizing;
-  /** Maximum number of connection attribute strings per thread */
-  ulong m_connect_attrs_sizing;
+  /** Maximum number of session attribute strings per thread */
+  ulong m_session_connect_attrs_sizing;
 };
 
 /**

=== modified file 'storage/perfschema/table_session_connect.cc'
--- a/storage/perfschema/table_session_connect.cc	2012-05-30 12:33:58 +0000
+++ b/storage/perfschema/table_session_connect.cc	2012-05-31 04:41:07 +0000
@@ -186,8 +186,9 @@ void table_session_connect::make_row(PFS
     return;
 
   /* populate the row */
-  if (read_nth_attr(pfs->m_connect_attrs, pfs->m_connect_attrs_length,
-                    pfs->m_connect_attrs_cs,
+  if (read_nth_attr(pfs->m_session_connect_attrs,
+                    pfs->m_session_connect_attrs_length,
+                    pfs->m_session_connect_attrs_cs,
                     ordinal,
                     m_row.m_attr_name, (uint) sizeof(m_row.m_attr_name),
                     &m_row.m_attr_name_length,

=== modified file 'storage/perfschema/unittest/pfs_account-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_account-oom-t.cc	2011-07-29 09:10:56 +0000
+++ b/storage/perfschema/unittest/pfs_account-oom-t.cc	2012-05-31 04:41:07 +0000
@@ -59,6 +59,7 @@ void test_oom()
   param.m_statement_class_sizing= 50;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   /* Setup */
 

=== modified file 'storage/perfschema/unittest/pfs_host-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_host-oom-t.cc	2011-07-29 09:10:56 +0000
+++ b/storage/perfschema/unittest/pfs_host-oom-t.cc	2012-05-31 04:41:07 +0000
@@ -59,6 +59,7 @@ void test_oom()
   param.m_statement_class_sizing= 50;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   /* Setup */
 

=== modified file 'storage/perfschema/unittest/pfs_instr-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr-oom-t.cc	2011-08-11 03:11:58 +0000
+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc	2012-05-31 04:41:07 +0000
@@ -63,6 +63,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -98,6 +99,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -133,6 +135,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -168,6 +171,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -201,6 +205,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -236,6 +241,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -271,6 +277,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
@@ -308,6 +315,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
@@ -341,6 +349,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
@@ -383,6 +392,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
@@ -417,6 +427,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 3;
   init_event_name_sizing(& param);
@@ -451,6 +462,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
@@ -485,6 +497,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 10;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
@@ -519,6 +532,7 @@ void test_oom()
   param.m_statement_class_sizing= 50;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
@@ -553,6 +567,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 1;
   init_event_name_sizing(& param);
@@ -587,6 +602,7 @@ void test_oom()
   param.m_statement_class_sizing= 0;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 3;
   init_event_name_sizing(& param);
@@ -624,6 +640,7 @@ void test_oom()
   param.m_statement_class_sizing= 20;
   param.m_events_statements_history_sizing= 0;
   param.m_events_statements_history_long_sizing= 0;
+  param.m_session_connect_attrs_sizing= 0;
 
   stub_alloc_fails_after_count= 3;
   init_event_name_sizing(& param);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (chris.powers:3925 to 3927) Bug#14076427Christopher Powers31 May