List:Commits« Previous MessageNext Message »
From:Marc Alff Date:October 12 2012 5:22pm
Subject:bzr push into mysql-trunk branch (marc.alff:4714 to 4715)
View as plain text  
 4715 Marc Alff	2012-10-12 [merge]
      Merge mysql-5.6 --> mysql-trunk

    modified:
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h.pp
      mysql-test/suite/perfschema/r/schema.result
      mysql-test/suite/perfschema/r/table_schema.result
      mysys/psi_noop.c
      scripts/mysql_system_tables.sql
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_atomic.h
      storage/perfschema/pfs_events.h
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/table_esgs_by_thread_by_event_name.cc
      storage/perfschema/table_esgs_by_thread_by_event_name.h
      storage/perfschema/table_esms_by_thread_by_event_name.cc
      storage/perfschema/table_esms_by_thread_by_event_name.h
      storage/perfschema/table_events_stages.cc
      storage/perfschema/table_events_stages.h
      storage/perfschema/table_events_statements.cc
      storage/perfschema/table_events_statements.h
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_events_waits.h
      storage/perfschema/table_ews_by_thread_by_event_name.cc
      storage/perfschema/table_ews_by_thread_by_event_name.h
      storage/perfschema/table_session_connect.cc
      storage/perfschema/table_socket_instances.cc
      storage/perfschema/table_socket_instances.h
      storage/perfschema/table_sync_instances.cc
      storage/perfschema/table_sync_instances.h
      storage/perfschema/table_threads.cc
      storage/perfschema/table_threads.h
 4714 Jon Olav Hauglid	2012-10-12 [merge]
      Merge from mysql-5.6 to mysql-trunk
      No conflicts

    modified:
      sql/item_func.h
      sql/log_event.cc
      sql/sql_cache.cc
=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h	2012-08-07 15:41:51 +0000
+++ b/include/mysql/psi/psi.h	2012-10-10 12:28:24 +0000
@@ -1299,7 +1299,7 @@ typedef int (*spawn_thread_v1_t)(PSI_thr
   @return an instrumented thread
 */
 typedef struct PSI_thread* (*new_thread_v1_t)
-  (PSI_thread_key key, const void *identity, ulong thread_id);
+  (PSI_thread_key key, const void *identity, ulonglong thread_id);
 
 /**
   Assign an id to an instrumented thread.
@@ -1307,7 +1307,7 @@ typedef struct PSI_thread* (*new_thread_
   @param id the id to assign
 */
 typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
-                                   unsigned long id);
+                                   ulonglong id);
 
 /**
   Get the instrumentation for the running thread.

=== modified file 'include/mysql/psi/psi_abi_v1.h.pp'
--- a/include/mysql/psi/psi_abi_v1.h.pp	2012-08-07 15:41:51 +0000
+++ b/include/mysql/psi/psi_abi_v1.h.pp	2012-10-10 12:28:24 +0000
@@ -344,9 +344,9 @@ typedef int (*spawn_thread_v1_t)(PSI_thr
                                  const pthread_attr_t *attr,
                                  void *(*start_routine)(void*), void *arg);
 typedef struct PSI_thread* (*new_thread_v1_t)
-  (PSI_thread_key key, const void *identity, ulong thread_id);
+  (PSI_thread_key key, const void *identity, ulonglong thread_id);
 typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
-                                   unsigned long id);
+                                   ulonglong id);
 typedef struct PSI_thread* (*get_thread_v1_t)(void);
 typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
 typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,

=== modified file 'mysql-test/suite/perfschema/r/schema.result'
--- a/mysql-test/suite/perfschema/r/schema.result	2012-05-02 09:30:40 +0000
+++ b/mysql-test/suite/perfschema/r/schema.result	2012-10-10 12:28:24 +0000
@@ -76,7 +76,7 @@ cond_instances	CREATE TABLE `cond_instan
 show create table events_stages_current;
 Table	Create Table
 events_stages_current	CREATE TABLE `events_stages_current` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -90,7 +90,7 @@ events_stages_current	CREATE TABLE `even
 show create table events_stages_history;
 Table	Create Table
 events_stages_history	CREATE TABLE `events_stages_history` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -104,7 +104,7 @@ events_stages_history	CREATE TABLE `even
 show create table events_stages_history_long;
 Table	Create Table
 events_stages_history_long	CREATE TABLE `events_stages_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -129,7 +129,7 @@ events_stages_summary_by_host_by_event_n
 show create table events_stages_summary_by_thread_by_event_name;
 Table	Create Table
 events_stages_summary_by_thread_by_event_name	CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
   `COUNT_STAR` bigint(20) unsigned NOT NULL,
   `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
@@ -173,7 +173,7 @@ events_stages_summary_global_by_event_na
 show create table events_statements_current;
 Table	Create Table
 events_statements_current	CREATE TABLE `events_statements_current` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -217,7 +217,7 @@ events_statements_current	CREATE TABLE `
 show create table events_statements_history;
 Table	Create Table
 events_statements_history	CREATE TABLE `events_statements_history` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -261,7 +261,7 @@ events_statements_history	CREATE TABLE `
 show create table events_statements_history_long;
 Table	Create Table
 events_statements_history_long	CREATE TABLE `events_statements_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -335,7 +335,7 @@ events_statements_summary_by_host_by_eve
 show create table events_statements_summary_by_thread_by_event_name;
 Table	Create Table
 events_statements_summary_by_thread_by_event_name	CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
   `COUNT_STAR` bigint(20) unsigned NOT NULL,
   `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
@@ -455,7 +455,7 @@ events_statements_summary_global_by_even
 show create table events_waits_current;
 Table	Create Table
 events_waits_current	CREATE TABLE `events_waits_current` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -478,7 +478,7 @@ events_waits_current	CREATE TABLE `event
 show create table events_waits_history;
 Table	Create Table
 events_waits_history	CREATE TABLE `events_waits_history` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -501,7 +501,7 @@ events_waits_history	CREATE TABLE `event
 show create table events_waits_history_long;
 Table	Create Table
 events_waits_history_long	CREATE TABLE `events_waits_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_ID` bigint(20) unsigned NOT NULL,
   `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
@@ -546,7 +546,7 @@ events_waits_summary_by_instance	CREATE
 show create table events_waits_summary_by_thread_by_event_name;
 Table	Create Table
 events_waits_summary_by_thread_by_event_name	CREATE TABLE `events_waits_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `EVENT_NAME` varchar(128) NOT NULL,
   `COUNT_STAR` bigint(20) unsigned NOT NULL,
   `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
@@ -695,7 +695,7 @@ Table	Create Table
 mutex_instances	CREATE TABLE `mutex_instances` (
   `NAME` varchar(128) NOT NULL,
   `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
-  `LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
+  `LOCKED_BY_THREAD_ID` bigint(20) unsigned DEFAULT NULL
 ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
 show create table objects_summary_global_by_type;
 Table	Create Table
@@ -722,7 +722,7 @@ Table	Create Table
 rwlock_instances	CREATE TABLE `rwlock_instances` (
   `NAME` varchar(128) NOT NULL,
   `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
-  `WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
+  `WRITE_LOCKED_BY_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
   `READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
 ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
 show create table setup_actors;
@@ -765,7 +765,7 @@ Table	Create Table
 socket_instances	CREATE TABLE `socket_instances` (
   `EVENT_NAME` varchar(128) NOT NULL,
   `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
-  `THREAD_ID` int(11) DEFAULT NULL,
+  `THREAD_ID` bigint(20) unsigned DEFAULT NULL,
   `SOCKET_ID` int(11) NOT NULL,
   `IP` varchar(64) NOT NULL,
   `PORT` int(11) NOT NULL,
@@ -991,10 +991,10 @@ table_lock_waits_summary_by_table	CREATE
 show create table threads;
 Table	Create Table
 threads	CREATE TABLE `threads` (
-  `THREAD_ID` int(11) NOT NULL,
+  `THREAD_ID` bigint(20) unsigned NOT NULL,
   `NAME` varchar(128) NOT NULL,
   `TYPE` varchar(10) NOT NULL,
-  `PROCESSLIST_ID` int(11) DEFAULT NULL,
+  `PROCESSLIST_ID` bigint(20) unsigned DEFAULT NULL,
   `PROCESSLIST_USER` varchar(16) DEFAULT NULL,
   `PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
   `PROCESSLIST_DB` varchar(64) DEFAULT NULL,
@@ -1002,7 +1002,7 @@ threads	CREATE TABLE `threads` (
   `PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
   `PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
   `PROCESSLIST_INFO` longtext,
-  `PARENT_THREAD_ID` int(11) DEFAULT NULL,
+  `PARENT_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
   `ROLE` varchar(64) DEFAULT NULL,
   `INSTRUMENTED` enum('YES','NO') NOT NULL
 ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8

=== modified file 'mysql-test/suite/perfschema/r/table_schema.result'
--- a/mysql-test/suite/perfschema/r/table_schema.result	2012-05-02 11:04:32 +0000
+++ b/mysql-test/suite/perfschema/r/table_schema.result	2012-10-10 12:28:24 +0000
@@ -7,7 +7,7 @@ def	performance_schema	accounts	CURRENT_
 def	performance_schema	accounts	TOTAL_CONNECTIONS	4	NULL	NO	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	cond_instances	NAME	1	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	cond_instances	OBJECT_INSTANCE_BEGIN	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	events_stages_current	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_stages_current	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_current	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_current	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_current	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -17,7 +17,7 @@ def	performance_schema	events_stages_cur
 def	performance_schema	events_stages_current	TIMER_WAIT	8	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_current	NESTING_EVENT_ID	9	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_current	NESTING_EVENT_TYPE	10	NULL	YES	enum	9	27	NULL	NULL	NULL	utf8	utf8_general_ci	enum('STATEMENT','STAGE','WAIT')			select,insert,update,references	
-def	performance_schema	events_stages_history	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_stages_history	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -27,7 +27,7 @@ def	performance_schema	events_stages_his
 def	performance_schema	events_stages_history	TIMER_WAIT	8	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history	NESTING_EVENT_ID	9	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history	NESTING_EVENT_TYPE	10	NULL	YES	enum	9	27	NULL	NULL	NULL	utf8	utf8_general_ci	enum('STATEMENT','STAGE','WAIT')			select,insert,update,references	
-def	performance_schema	events_stages_history_long	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_stages_history_long	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history_long	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history_long	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_history_long	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -52,7 +52,7 @@ def	performance_schema	events_stages_sum
 def	performance_schema	events_stages_summary_by_host_by_event_name	MIN_TIMER_WAIT	5	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_summary_by_host_by_event_name	AVG_TIMER_WAIT	6	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_summary_by_host_by_event_name	MAX_TIMER_WAIT	7	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	events_stages_summary_by_thread_by_event_name	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_stages_summary_by_thread_by_event_name	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_summary_by_thread_by_event_name	EVENT_NAME	2	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	events_stages_summary_by_thread_by_event_name	COUNT_STAR	3	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_summary_by_thread_by_event_name	SUM_TIMER_WAIT	4	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
@@ -72,7 +72,7 @@ def	performance_schema	events_stages_sum
 def	performance_schema	events_stages_summary_global_by_event_name	MIN_TIMER_WAIT	4	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_summary_global_by_event_name	AVG_TIMER_WAIT	5	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_stages_summary_global_by_event_name	MAX_TIMER_WAIT	6	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	events_statements_current	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_statements_current	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_current	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_current	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_current	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -112,7 +112,7 @@ def	performance_schema	events_statements
 def	performance_schema	events_statements_current	NO_GOOD_INDEX_USED	38	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_current	NESTING_EVENT_ID	39	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_current	NESTING_EVENT_TYPE	40	NULL	YES	enum	9	27	NULL	NULL	NULL	utf8	utf8_general_ci	enum('STATEMENT','STAGE','WAIT')			select,insert,update,references	
-def	performance_schema	events_statements_history	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_statements_history	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -152,7 +152,7 @@ def	performance_schema	events_statements
 def	performance_schema	events_statements_history	NO_GOOD_INDEX_USED	38	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history	NESTING_EVENT_ID	39	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history	NESTING_EVENT_TYPE	40	NULL	YES	enum	9	27	NULL	NULL	NULL	utf8	utf8_general_ci	enum('STATEMENT','STAGE','WAIT')			select,insert,update,references	
-def	performance_schema	events_statements_history_long	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_statements_history_long	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history_long	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history_long	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_history_long	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -273,7 +273,7 @@ def	performance_schema	events_statements
 def	performance_schema	events_statements_summary_by_host_by_event_name	SUM_SORT_SCAN	24	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_summary_by_host_by_event_name	SUM_NO_INDEX_USED	25	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_summary_by_host_by_event_name	SUM_NO_GOOD_INDEX_USED	26	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	events_statements_summary_by_thread_by_event_name	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_statements_summary_by_thread_by_event_name	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_summary_by_thread_by_event_name	EVENT_NAME	2	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	events_statements_summary_by_thread_by_event_name	COUNT_STAR	3	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_summary_by_thread_by_event_name	SUM_TIMER_WAIT	4	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
@@ -350,7 +350,7 @@ def	performance_schema	events_statements
 def	performance_schema	events_statements_summary_global_by_event_name	SUM_SORT_SCAN	23	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_summary_global_by_event_name	SUM_NO_INDEX_USED	24	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_statements_summary_global_by_event_name	SUM_NO_GOOD_INDEX_USED	25	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	events_waits_current	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_waits_current	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_current	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_current	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_current	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -369,7 +369,7 @@ def	performance_schema	events_waits_curr
 def	performance_schema	events_waits_current	OPERATION	17	NULL	NO	varchar	32	96	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select,insert,update,references	
 def	performance_schema	events_waits_current	NUMBER_OF_BYTES	18	NULL	YES	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	events_waits_current	FLAGS	19	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(10) unsigned			select,insert,update,references	
-def	performance_schema	events_waits_history	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_waits_history	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_history	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_history	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_history	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -388,7 +388,7 @@ def	performance_schema	events_waits_hist
 def	performance_schema	events_waits_history	OPERATION	17	NULL	NO	varchar	32	96	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select,insert,update,references	
 def	performance_schema	events_waits_history	NUMBER_OF_BYTES	18	NULL	YES	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	events_waits_history	FLAGS	19	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(10) unsigned			select,insert,update,references	
-def	performance_schema	events_waits_history_long	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_waits_history_long	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_history_long	EVENT_ID	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_history_long	END_EVENT_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_history_long	EVENT_NAME	4	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
@@ -429,7 +429,7 @@ def	performance_schema	events_waits_summ
 def	performance_schema	events_waits_summary_by_instance	MIN_TIMER_WAIT	5	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_summary_by_instance	AVG_TIMER_WAIT	6	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_summary_by_instance	MAX_TIMER_WAIT	7	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	events_waits_summary_by_thread_by_event_name	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	events_waits_summary_by_thread_by_event_name	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_summary_by_thread_by_event_name	EVENT_NAME	2	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	events_waits_summary_by_thread_by_event_name	COUNT_STAR	3	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	events_waits_summary_by_thread_by_event_name	SUM_TIMER_WAIT	4	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
@@ -534,7 +534,7 @@ def	performance_schema	host_cache	FIRST_
 def	performance_schema	host_cache	LAST_ERROR_SEEN	29	0000-00-00 00:00:00	YES	timestamp	NULL	NULL	NULL	NULL	0	NULL	NULL	timestamp			select,insert,update,references	
 def	performance_schema	mutex_instances	NAME	1	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	mutex_instances	OBJECT_INSTANCE_BEGIN	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	mutex_instances	LOCKED_BY_THREAD_ID	3	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	mutex_instances	LOCKED_BY_THREAD_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	objects_summary_global_by_type	OBJECT_TYPE	1	NULL	YES	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
 def	performance_schema	objects_summary_global_by_type	OBJECT_SCHEMA	2	NULL	YES	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
 def	performance_schema	objects_summary_global_by_type	OBJECT_NAME	3	NULL	YES	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
@@ -549,7 +549,7 @@ def	performance_schema	performance_timer
 def	performance_schema	performance_timers	TIMER_OVERHEAD	4	NULL	YES	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	rwlock_instances	NAME	1	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	rwlock_instances	OBJECT_INSTANCE_BEGIN	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	rwlock_instances	WRITE_LOCKED_BY_THREAD_ID	3	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	rwlock_instances	WRITE_LOCKED_BY_THREAD_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	rwlock_instances	READ_LOCKED_BY_COUNT	4	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(10) unsigned			select,insert,update,references	
 def	performance_schema	session_account_connect_attrs	PROCESSLIST_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
 def	performance_schema	session_account_connect_attrs	ATTR_NAME	2	NULL	NO	varchar	32	96	NULL	NULL	NULL	utf8	utf8_bin	varchar(32)			select,insert,update,references	
@@ -576,7 +576,7 @@ def	performance_schema	setup_timers	NAME
 def	performance_schema	setup_timers	TIMER_NAME	2	NULL	NO	enum	11	33	NULL	NULL	NULL	utf8	utf8_general_ci	enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK')			select,insert,update,references	
 def	performance_schema	socket_instances	EVENT_NAME	1	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	socket_instances	OBJECT_INSTANCE_BEGIN	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	socket_instances	THREAD_ID	3	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	socket_instances	THREAD_ID	3	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	socket_instances	SOCKET_ID	4	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
 def	performance_schema	socket_instances	IP	5	NULL	NO	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
 def	performance_schema	socket_instances	PORT	6	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
@@ -778,10 +778,10 @@ def	performance_schema	table_lock_waits_
 def	performance_schema	table_lock_waits_summary_by_table	MIN_TIMER_WRITE_EXTERNAL	71	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	table_lock_waits_summary_by_table	AVG_TIMER_WRITE_EXTERNAL	72	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	table_lock_waits_summary_by_table	MAX_TIMER_WRITE_EXTERNAL	73	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
-def	performance_schema	threads	THREAD_ID	1	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	threads	THREAD_ID	1	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	threads	NAME	2	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	threads	TYPE	3	NULL	NO	varchar	10	30	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(10)			select,insert,update,references	
-def	performance_schema	threads	PROCESSLIST_ID	4	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	threads	PROCESSLIST_ID	4	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	threads	PROCESSLIST_USER	5	NULL	YES	varchar	16	48	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(16)			select,insert,update,references	
 def	performance_schema	threads	PROCESSLIST_HOST	6	NULL	YES	varchar	60	180	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(60)			select,insert,update,references	
 def	performance_schema	threads	PROCESSLIST_DB	7	NULL	YES	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
@@ -789,7 +789,7 @@ def	performance_schema	threads	PROCESSLI
 def	performance_schema	threads	PROCESSLIST_TIME	9	NULL	YES	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	threads	PROCESSLIST_STATE	10	NULL	YES	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
 def	performance_schema	threads	PROCESSLIST_INFO	11	NULL	YES	longtext	4294967295	4294967295	NULL	NULL	NULL	utf8	utf8_general_ci	longtext			select,insert,update,references	
-def	performance_schema	threads	PARENT_THREAD_ID	12	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	
+def	performance_schema	threads	PARENT_THREAD_ID	12	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	threads	ROLE	13	NULL	YES	varchar	64	192	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select,insert,update,references	
 def	performance_schema	threads	INSTRUMENTED	14	NULL	NO	enum	3	9	NULL	NULL	NULL	utf8	utf8_general_ci	enum('YES','NO')			select,insert,update,references	
 def	performance_schema	users	USER	1	NULL	YES	char	16	48	NULL	NULL	NULL	utf8	utf8_bin	char(16)			select,insert,update,references	

=== modified file 'mysys/psi_noop.c'
--- a/mysys/psi_noop.c	2012-08-07 15:41:51 +0000
+++ b/mysys/psi_noop.c	2012-10-10 12:28:24 +0000
@@ -189,12 +189,12 @@ static int spawn_thread_noop(PSI_thread_
 
 static PSI_thread*
 new_thread_noop(PSI_thread_key key NNN,
-                const void *identity NNN, ulong thread_id NNN)
+                const void *identity NNN, ulonglong thread_id NNN)
 {
   return NULL;
 }
 
-static void set_thread_id_noop(PSI_thread *thread NNN, unsigned long id NNN)
+static void set_thread_id_noop(PSI_thread *thread NNN, ulonglong id NNN)
 {
   return;
 }

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2012-08-31 21:54:56 +0000
+++ b/scripts/mysql_system_tables.sql	2012-10-12 17:21:59 +0000
@@ -281,7 +281,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_waits_current("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -312,7 +312,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_waits_history("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -343,7 +343,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_waits_history_long("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -451,7 +451,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_waits_summary_by_thread_by_event_name("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_NAME VARCHAR(128) not null,"
   "COUNT_STAR BIGINT unsigned not null,"
   "SUM_TIMER_WAIT BIGINT unsigned not null,"
@@ -578,7 +578,7 @@ 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,"
+  "THREAD_ID BIGINT unsigned,"
   "SOCKET_ID INTEGER not null,"
   "IP VARCHAR(64) not null,"
   "PORT INTEGER not null,"
@@ -709,7 +709,7 @@ DROP PREPARE stmt;
 SET @cmd="CREATE TABLE performance_schema.mutex_instances("
   "NAME VARCHAR(128) not null,"
   "OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
-  "LOCKED_BY_THREAD_ID INTEGER"
+  "LOCKED_BY_THREAD_ID BIGINT unsigned"
   ")ENGINE=PERFORMANCE_SCHEMA;";
 
 SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0');
@@ -760,7 +760,7 @@ DROP PREPARE stmt;
 SET @cmd="CREATE TABLE performance_schema.rwlock_instances("
   "NAME VARCHAR(128) not null,"
   "OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
-  "WRITE_LOCKED_BY_THREAD_ID INTEGER,"
+  "WRITE_LOCKED_BY_THREAD_ID BIGINT unsigned,"
   "READ_LOCKED_BY_COUNT INTEGER unsigned not null"
   ")ENGINE=PERFORMANCE_SCHEMA;";
 
@@ -1035,10 +1035,10 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.threads("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "NAME VARCHAR(128) not null,"
   "TYPE VARCHAR(10) not null,"
-  "PROCESSLIST_ID INTEGER,"
+  "PROCESSLIST_ID BIGINT unsigned,"
   "PROCESSLIST_USER VARCHAR(16),"
   "PROCESSLIST_HOST VARCHAR(60),"
   "PROCESSLIST_DB VARCHAR(64),"
@@ -1046,7 +1046,7 @@ SET @cmd="CREATE TABLE performance_schem
   "PROCESSLIST_TIME BIGINT,"
   "PROCESSLIST_STATE VARCHAR(64),"
   "PROCESSLIST_INFO LONGTEXT,"
-  "PARENT_THREAD_ID INTEGER,"
+  "PARENT_THREAD_ID BIGINT unsigned,"
   "ROLE VARCHAR(64),"
   "INSTRUMENTED ENUM ('YES', 'NO') not null"
   ")ENGINE=PERFORMANCE_SCHEMA;";
@@ -1061,7 +1061,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_stages_current("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -1083,7 +1083,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_stages_history("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -1105,7 +1105,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_stages_history_long("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -1127,7 +1127,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_stages_summary_by_thread_by_event_name("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_NAME VARCHAR(128) not null,"
   "COUNT_STAR BIGINT unsigned not null,"
   "SUM_TIMER_WAIT BIGINT unsigned not null,"
@@ -1222,7 +1222,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_statements_current("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -1274,7 +1274,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_statements_history("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -1326,7 +1326,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_statements_history_long("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_ID BIGINT unsigned not null,"
   "END_EVENT_ID BIGINT unsigned,"
   "EVENT_NAME VARCHAR(128) not null,"
@@ -1378,7 +1378,7 @@ DROP PREPARE stmt;
 --
 
 SET @cmd="CREATE TABLE performance_schema.events_statements_summary_by_thread_by_event_name("
-  "THREAD_ID INTEGER not null,"
+  "THREAD_ID BIGINT unsigned not null,"
   "EVENT_NAME VARCHAR(128) not null,"
   "COUNT_STAR BIGINT unsigned not null,"
   "SUM_TIMER_WAIT BIGINT unsigned not null,"

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2012-09-26 01:25:56 +0000
+++ b/storage/perfschema/pfs.cc	2012-10-12 17:21:59 +0000
@@ -1888,13 +1888,13 @@ static int spawn_thread_v1(PSI_thread_ke
   @sa PSI_v1::new_thread.
 */
 static PSI_thread*
-new_thread_v1(PSI_thread_key key, const void *identity, ulong thread_id)
+new_thread_v1(PSI_thread_key key, const void *identity, ulonglong processlist_id)
 {
   PFS_thread *pfs;
 
   PFS_thread_class *klass= find_thread_class(key);
   if (likely(klass != NULL))
-    pfs= create_thread(klass, identity, thread_id);
+    pfs= create_thread(klass, identity, processlist_id);
   else
     pfs= NULL;
 
@@ -1905,12 +1905,12 @@ new_thread_v1(PSI_thread_key key, const
   Implementation of the thread instrumentation interface.
   @sa PSI_v1::set_thread_id.
 */
-static void set_thread_id_v1(PSI_thread *thread, unsigned long id)
+static void set_thread_id_v1(PSI_thread *thread, ulonglong processlist_id)
 {
   PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
   if (unlikely(pfs == NULL))
     return;
-  pfs->m_thread_id= id;
+  pfs->m_processlist_id= processlist_id;
 }
 
 /**

=== modified file 'storage/perfschema/pfs_atomic.h'
--- a/storage/perfschema/pfs_atomic.h	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/pfs_atomic.h	2012-10-10 12:28:24 +0000
@@ -43,6 +43,16 @@ public:
   }
 
   /** Atomic load. */
+  static inline int64 load_64(volatile int64 *ptr)
+  {
+    int64 result;
+    rdlock(ptr);
+    result= my_atomic_load64(ptr);
+    rdunlock(ptr);
+    return result;
+  }
+
+  /** Atomic load. */
   static inline uint32 load_u32(volatile uint32 *ptr)
   {
     uint32 result;
@@ -52,6 +62,16 @@ public:
     return result;
   }
 
+  /** Atomic load. */
+  static inline uint64 load_u64(volatile uint64 *ptr)
+  {
+    uint64 result;
+    rdlock(ptr);
+    result= (uint64) my_atomic_load64((int64*) ptr);
+    rdunlock(ptr);
+    return result;
+  }
+
   /** Atomic store. */
   static inline void store_32(volatile int32 *ptr, int32 value)
   {
@@ -61,6 +81,14 @@ public:
   }
 
   /** Atomic store. */
+  static inline void store_64(volatile int64 *ptr, int64 value)
+  {
+    wrlock(ptr);
+    my_atomic_store64(ptr, value);
+    wrunlock(ptr);
+  }
+
+  /** Atomic store. */
   static inline void store_u32(volatile uint32 *ptr, uint32 value)
   {
     wrlock(ptr);
@@ -68,6 +96,14 @@ public:
     wrunlock(ptr);
   }
 
+  /** Atomic store. */
+  static inline void store_u64(volatile uint64 *ptr, uint64 value)
+  {
+    wrlock(ptr);
+    my_atomic_store64((int64*) ptr, (int64) value);
+    wrunlock(ptr);
+  }
+
   /** Atomic add. */
   static inline int32 add_32(volatile int32 *ptr, int32 value)
   {
@@ -79,6 +115,16 @@ public:
   }
 
   /** Atomic add. */
+  static inline int64 add_64(volatile int64 *ptr, int64 value)
+  {
+    int64 result;
+    wrlock(ptr);
+    result= my_atomic_add64(ptr, value);
+    wrunlock(ptr);
+    return result;
+  }
+
+  /** Atomic add. */
   static inline uint32 add_u32(volatile uint32 *ptr, uint32 value)
   {
     uint32 result;
@@ -88,6 +134,16 @@ public:
     return result;
   }
 
+  /** Atomic add. */
+  static inline uint64 add_u64(volatile uint64 *ptr, uint64 value)
+  {
+    uint64 result;
+    wrlock(ptr);
+    result= (uint64) my_atomic_add64((int64*) ptr, (int64) value);
+    wrunlock(ptr);
+    return result;
+  }
+
   /** Atomic compare and swap. */
   static inline bool cas_32(volatile int32 *ptr, int32 *old_value,
                             int32 new_value)
@@ -100,6 +156,17 @@ public:
   }
 
   /** Atomic compare and swap. */
+  static inline bool cas_64(volatile int64 *ptr, int64 *old_value,
+                            int64 new_value)
+  {
+    bool result;
+    wrlock(ptr);
+    result= my_atomic_cas64(ptr, old_value, new_value);
+    wrunlock(ptr);
+    return result;
+  }
+
+  /** Atomic compare and swap. */
   static inline bool cas_u32(volatile uint32 *ptr, uint32 *old_value,
                              uint32 new_value)
   {
@@ -110,6 +177,18 @@ public:
     wrunlock(ptr);
     return result;
   }
+
+  /** Atomic compare and swap. */
+  static inline bool cas_u64(volatile uint64 *ptr, uint64 *old_value,
+                             uint64 new_value)
+  {
+    bool result;
+    wrlock(ptr);
+    result= my_atomic_cas64((int64*) ptr, (int64*) old_value,
+                            (uint64) new_value);
+    wrunlock(ptr);
+    return result;
+  }
 
 private:
   static my_atomic_rwlock_t m_rwlock_array[256];

=== modified file 'storage/perfschema/pfs_events.h'
--- a/storage/perfschema/pfs_events.h	2011-08-26 08:42:40 +0000
+++ b/storage/perfschema/pfs_events.h	2012-10-10 12:28:24 +0000
@@ -29,7 +29,7 @@ struct PFS_instr_class;
 struct PFS_events
 {
   /** THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** EVENT_ID. */
   ulonglong m_event_id;
   /** END_EVENT_ID. */

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2012-09-25 21:39:49 +0000
+++ b/storage/perfschema/pfs_instr.cc	2012-10-10 12:28:24 +0000
@@ -147,7 +147,7 @@ PFS_socket *socket_array= NULL;
 PFS_stage_stat *global_instr_class_stages_array= NULL;
 PFS_statement_stat *global_instr_class_statements_array= NULL;
 
-static volatile uint32 thread_internal_id_counter= 0;
+static volatile uint64 thread_internal_id_counter= 0;
 
 static uint thread_instr_class_waits_sizing;
 static uint thread_instr_class_stages_sizing;
@@ -806,12 +806,12 @@ void PFS_thread::reset_session_connect_a
   @param klass                        the thread class
   @param identity                     the thread address,
     or a value characteristic of this thread
-  @param thread_id                    the PROCESSLIST thread id,
+  @param processlist_id               the PROCESSLIST id,
     or 0 if unknown
   @return a thread instance, or NULL
 */
 PFS_thread* create_thread(PFS_thread_class *klass, const void *identity,
-                          ulong thread_id)
+                          ulonglong processlist_id)
 {
   static uint PFS_ALIGNED thread_monotonic_index= 0;
   uint index;
@@ -829,9 +829,9 @@ PFS_thread* create_thread(PFS_thread_cla
       if (pfs->m_lock.free_to_dirty())
       {
         pfs->m_thread_internal_id=
-          PFS_atomic::add_u32(&thread_internal_id_counter, 1);
+          PFS_atomic::add_u64(&thread_internal_id_counter, 1);
         pfs->m_parent_thread_internal_id= 0;
-        pfs->m_thread_id= thread_id;
+        pfs->m_processlist_id= processlist_id;
         pfs->m_event_id= 1;
         pfs->m_enabled= true;
         pfs->m_class= klass;

=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h	2012-09-25 21:39:49 +0000
+++ b/storage/perfschema/pfs_instr.h	2012-10-10 12:28:24 +0000
@@ -390,11 +390,11 @@ struct PFS_ALIGNED PFS_thread : PFS_conn
   /** Pins for digest_hash. */
   LF_PINS *m_digest_hash_pins;
   /** Internal thread identifier, unique. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Parent internal thread identifier. */
-  ulong m_parent_thread_internal_id;
+  ulonglong m_parent_thread_internal_id;
   /** External (SHOW PROCESSLIST) thread identifier, not unique. */
-  ulong m_thread_id;
+  ulong m_processlist_id;
   /** Thread class. */
   PFS_thread_class *m_class;
   /**
@@ -530,7 +530,7 @@ PFS_cond* create_cond(PFS_cond_class *kl
 void destroy_cond(PFS_cond *pfs);
 
 PFS_thread* create_thread(PFS_thread_class *klass, const void *identity,
-                          ulong thread_id);
+                          ulonglong processlist_id);
 
 void destroy_thread(PFS_thread *pfs);
 

=== modified file 'storage/perfschema/table_esgs_by_thread_by_event_name.cc'
--- a/storage/perfschema/table_esgs_by_thread_by_event_name.cc	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_esgs_by_thread_by_event_name.cc	2012-10-10 12:28:24 +0000
@@ -33,7 +33,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -212,7 +212,7 @@ int table_esgs_by_thread_by_event_name
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* NAME */
         m_row.m_event_name.set_field(f);

=== modified file 'storage/perfschema/table_esgs_by_thread_by_event_name.h'
--- a/storage/perfschema/table_esgs_by_thread_by_event_name.h	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_esgs_by_thread_by_event_name.h	2012-10-10 12:28:24 +0000
@@ -39,7 +39,7 @@
 struct row_esgs_by_thread_by_event_name
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column EVENT_NAME. */
   PFS_event_name_row m_event_name;
   /** Columns COUNT_STAR, SUM/MIN/AVG/MAX TIMER_WAIT. */

=== modified file 'storage/perfschema/table_esms_by_thread_by_event_name.cc'
--- a/storage/perfschema/table_esms_by_thread_by_event_name.cc	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_esms_by_thread_by_event_name.cc	2012-10-10 12:28:24 +0000
@@ -33,7 +33,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -308,7 +308,7 @@ int table_esms_by_thread_by_event_name
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* EVENT_NAME */
         m_row.m_event_name.set_field(f);

=== modified file 'storage/perfschema/table_esms_by_thread_by_event_name.h'
--- a/storage/perfschema/table_esms_by_thread_by_event_name.h	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_esms_by_thread_by_event_name.h	2012-10-10 12:28:24 +0000
@@ -39,7 +39,7 @@
 struct row_esms_by_thread_by_event_name
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column EVENT_NAME. */
   PFS_event_name_row m_event_name;
   /** Columns COUNT_STAR, SUM/MIN/AVG/MAX TIMER_WAIT. */

=== modified file 'storage/perfschema/table_events_stages.cc'
--- a/storage/perfschema/table_events_stages.cc	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_events_stages.cc	2012-10-10 12:28:24 +0000
@@ -32,7 +32,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -207,7 +207,7 @@ int table_events_stages_common::read_row
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* EVENT_ID */
         set_field_ulonglong(f, m_row.m_event_id);

=== modified file 'storage/perfschema/table_events_stages.h'
--- a/storage/perfschema/table_events_stages.h	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_events_stages.h	2012-10-10 12:28:24 +0000
@@ -36,7 +36,7 @@ struct PFS_thread;
 struct row_events_stages
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column EVENT_ID. */
   ulonglong m_event_id;
   /** Column END_EVENT_ID. */

=== modified file 'storage/perfschema/table_events_statements.cc'
--- a/storage/perfschema/table_events_statements.cc	2012-02-29 14:43:11 +0000
+++ b/storage/perfschema/table_events_statements.cc	2012-10-10 12:28:24 +0000
@@ -35,7 +35,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -420,7 +420,7 @@ int table_events_statements_common::read
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* EVENT_ID */
         set_field_ulonglong(f, m_row.m_event_id);

=== modified file 'storage/perfschema/table_events_statements.h'
--- a/storage/perfschema/table_events_statements.h	2012-02-23 23:27:02 +0000
+++ b/storage/perfschema/table_events_statements.h	2012-10-10 12:28:24 +0000
@@ -37,7 +37,7 @@ struct PFS_thread;
 struct row_events_statements
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column EVENT_ID. */
   ulonglong m_event_id;
   /** Column END_EVENT_ID. */

=== modified file 'storage/perfschema/table_events_waits.cc'
--- a/storage/perfschema/table_events_waits.cc	2012-03-19 19:29:28 +0000
+++ b/storage/perfschema/table_events_waits.cc	2012-10-10 12:28:24 +0000
@@ -34,7 +34,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -603,7 +603,7 @@ int table_events_waits_common::read_row_
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* EVENT_ID */
         set_field_ulonglong(f, m_row.m_event_id);

=== modified file 'storage/perfschema/table_events_waits.h'
--- a/storage/perfschema/table_events_waits.h	2011-08-26 08:42:40 +0000
+++ b/storage/perfschema/table_events_waits.h	2012-10-10 12:28:24 +0000
@@ -36,7 +36,7 @@ struct PFS_thread;
 struct row_events_waits
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column EVENT_ID. */
   ulonglong m_event_id;
   /** Column END_EVENT_ID. */

=== modified file 'storage/perfschema/table_ews_by_thread_by_event_name.cc'
--- a/storage/perfschema/table_ews_by_thread_by_event_name.cc	2012-01-24 23:42:36 +0000
+++ b/storage/perfschema/table_ews_by_thread_by_event_name.cc	2012-10-10 12:28:24 +0000
@@ -33,7 +33,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -282,7 +282,7 @@ int table_ews_by_thread_by_event_name
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* EVENT_NAME */
         m_row.m_event_name.set_field(f);

=== modified file 'storage/perfschema/table_ews_by_thread_by_event_name.h'
--- a/storage/perfschema/table_ews_by_thread_by_event_name.h	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/table_ews_by_thread_by_event_name.h	2012-10-10 12:28:24 +0000
@@ -39,7 +39,7 @@
 struct row_ews_by_thread_by_event_name
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column EVENT_NAME. */
   PFS_event_name_row m_event_name;
   /** Columns COUNT_STAR, SUM/MIN/AVG/MAX TIMER_WAIT. */

=== modified file 'storage/perfschema/table_session_connect.cc'
--- a/storage/perfschema/table_session_connect.cc	2012-08-31 16:24:08 +0000
+++ b/storage/perfschema/table_session_connect.cc	2012-10-10 12:28:24 +0000
@@ -200,10 +200,10 @@ void table_session_connect::make_row(PFS
                     &m_row.m_attr_value_length))
   {
     /* we don't expect internal threads to have connection attributes */
-    DBUG_ASSERT(pfs->m_thread_id != 0);
+    DBUG_ASSERT(pfs->m_processlist_id != 0);
 
     m_row.m_ordinal_position= ordinal;
-    m_row.m_process_id= pfs->m_thread_id;
+    m_row.m_process_id= pfs->m_processlist_id;
   }
   else
     return;

=== modified file 'storage/perfschema/table_socket_instances.cc'
--- a/storage/perfschema/table_socket_instances.cc	2011-08-17 20:29:21 +0000
+++ b/storage/perfschema/table_socket_instances.cc	2012-10-10 12:28:24 +0000
@@ -42,7 +42,7 @@ static const TABLE_FIELD_TYPE field_type
   },
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -205,7 +205,7 @@ int table_socket_instances::read_row_val
         break;
       case 2: /* THREAD_ID */
         if (m_row.m_thread_id_set)
-          set_field_ulong(f, m_row.m_thread_id);
+          set_field_ulonglong(f, m_row.m_thread_id);
         else
           f->set_null();
         break;

=== modified file 'storage/perfschema/table_socket_instances.h'
--- a/storage/perfschema/table_socket_instances.h	2011-07-25 03:34:01 +0000
+++ b/storage/perfschema/table_socket_instances.h	2012-10-10 12:28:24 +0000
@@ -39,7 +39,7 @@ struct row_socket_instances
   /** Column OBJECT_INSTANCE_BEGIN */
   const void *m_identity;
   /** Column THREAD_ID */
-  uint m_thread_id;
+  ulonglong m_thread_id;
   /** True if thread_is is set */
   bool m_thread_id_set;
   /** Column SOCKET_ID */

=== modified file 'storage/perfschema/table_sync_instances.cc'
--- a/storage/perfschema/table_sync_instances.cc	2010-11-09 08:16:50 +0000
+++ b/storage/perfschema/table_sync_instances.cc	2012-10-10 12:28:24 +0000
@@ -43,7 +43,7 @@ static const TABLE_FIELD_TYPE mutex_fiel
   },
   {
     { C_STRING_WITH_LEN("LOCKED_BY_THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   }
 };
@@ -178,7 +178,7 @@ int table_mutex_instances::read_row_valu
         break;
       case 2: /* LOCKED_BY_THREAD_ID */
         if (m_row.m_locked)
-          set_field_ulong(f, m_row.m_locked_by_thread_id);
+          set_field_ulonglong(f, m_row.m_locked_by_thread_id);
         else
           f->set_null();
         break;
@@ -207,7 +207,7 @@ static const TABLE_FIELD_TYPE rwlock_fie
   },
   {
     { C_STRING_WITH_LEN("WRITE_LOCKED_BY_THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -351,7 +351,7 @@ int table_rwlock_instances::read_row_val
         break;
       case 2: /* WRITE_LOCKED_BY_THREAD_ID */
         if (m_row.m_write_locked)
-          set_field_ulong(f, m_row.m_write_locked_by_thread_id);
+          set_field_ulonglong(f, m_row.m_write_locked_by_thread_id);
         else
           f->set_null();
         break;

=== modified file 'storage/perfschema/table_sync_instances.h'
--- a/storage/perfschema/table_sync_instances.h	2010-07-23 19:03:52 +0000
+++ b/storage/perfschema/table_sync_instances.h	2012-10-10 12:28:24 +0000
@@ -45,7 +45,7 @@ struct row_mutex_instances
   /** True if column LOCKED_BY_THREAD_ID is not null. */
   bool m_locked;
   /** Column LOCKED_BY_THREAD_ID. */
-  ulong m_locked_by_thread_id;
+  ulonglong m_locked_by_thread_id;
 };
 
 /** Table PERFORMANCE_SCHEMA.MUTEX_INSTANCES. */
@@ -102,7 +102,7 @@ struct row_rwlock_instances
   /** True if column WRITE_LOCKED_BY_THREAD_ID is not null. */
   bool m_write_locked;
   /** Column WRITE_LOCKED_BY_THREAD_ID. */
-  ulong m_write_locked_by_thread_id;
+  ulonglong m_write_locked_by_thread_id;
   /** Column READ_LOCKED_BY_COUNT. */
   ulong m_readers;
 };

=== modified file 'storage/perfschema/table_threads.cc'
--- a/storage/perfschema/table_threads.cc	2012-09-25 21:39:49 +0000
+++ b/storage/perfschema/table_threads.cc	2012-10-10 12:28:24 +0000
@@ -26,7 +26,7 @@ static const TABLE_FIELD_TYPE field_type
 {
   {
     { C_STRING_WITH_LEN("THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -41,7 +41,7 @@ static const TABLE_FIELD_TYPE field_type
   },
   {
     { C_STRING_WITH_LEN("PROCESSLIST_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -81,7 +81,7 @@ static const TABLE_FIELD_TYPE field_type
   },
   {
     { C_STRING_WITH_LEN("PARENT_THREAD_ID") },
-    { C_STRING_WITH_LEN("int(11)") },
+    { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
   },
   {
@@ -143,7 +143,7 @@ void table_threads::make_row(PFS_thread
 
   m_row.m_thread_internal_id= pfs->m_thread_internal_id;
   m_row.m_parent_thread_internal_id= pfs->m_parent_thread_internal_id;
-  m_row.m_thread_id= pfs->m_thread_id;
+  m_row.m_processlist_id= pfs->m_processlist_id;
   m_row.m_name= safe_class->m_name;
   m_row.m_name_length= safe_class->m_name_length;
 
@@ -219,20 +219,20 @@ int table_threads::read_row_values(TABLE
       switch(f->field_index)
       {
       case 0: /* THREAD_ID */
-        set_field_ulong(f, m_row.m_thread_internal_id);
+        set_field_ulonglong(f, m_row.m_thread_internal_id);
         break;
       case 1: /* NAME */
         set_field_varchar_utf8(f, m_row.m_name, m_row.m_name_length);
         break;
       case 2: /* TYPE */
-        if (m_row.m_thread_id != 0)
+        if (m_row.m_processlist_id != 0)
           set_field_varchar_utf8(f, "FOREGROUND", 10);
         else
           set_field_varchar_utf8(f, "BACKGROUND", 10);
         break;
       case 3: /* PROCESSLIST_ID */
-        if (m_row.m_thread_id != 0)
-          set_field_ulong(f, m_row.m_thread_id);
+        if (m_row.m_processlist_id != 0)
+          set_field_ulonglong(f, m_row.m_processlist_id);
         else
           f->set_null();
         break;
@@ -258,7 +258,7 @@ int table_threads::read_row_values(TABLE
           f->set_null();
         break;
       case 7: /* PROCESSLIST_COMMAND */
-        if (m_row.m_thread_id != 0)
+        if (m_row.m_processlist_id != 0)
           set_field_varchar_utf8(f, command_name[m_row.m_command].str,
                                  command_name[m_row.m_command].length);
         else
@@ -290,7 +290,7 @@ int table_threads::read_row_values(TABLE
         break;
       case 11: /* PARENT_THREAD_ID */
         if (m_row.m_parent_thread_internal_id != 0)
-          set_field_ulong(f, m_row.m_parent_thread_internal_id);
+          set_field_ulonglong(f, m_row.m_parent_thread_internal_id);
         else
           f->set_null();
         break;

=== modified file 'storage/perfschema/table_threads.h'
--- a/storage/perfschema/table_threads.h	2011-05-07 00:40:25 +0000
+++ b/storage/perfschema/table_threads.h	2012-10-10 12:28:24 +0000
@@ -32,9 +32,9 @@ struct PFS_thread;
 struct row_threads
 {
   /** Column THREAD_ID. */
-  ulong m_thread_internal_id;
+  ulonglong m_thread_internal_id;
   /** Column PROCESSLIST_ID. */
-  ulong m_thread_id;
+  ulonglong m_processlist_id;
   /** Column NAME. */
   const char* m_name;
   /** Length in bytes of @c m_name. */
@@ -66,7 +66,7 @@ struct row_threads
   /** Column INSTRUMENTED. */
   bool *m_enabled_ptr;
   /** Column PARENT_THREAD_ID. */
-  ulong m_parent_thread_internal_id;
+  ulonglong m_parent_thread_internal_id;
 };
 
 /** Table PERFORMANCE_SCHEMA.THREADS. */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marc.alff:4714 to 4715) Marc Alff15 Oct