List:Commits« Previous MessageNext Message »
From:Marc Alff Date:October 26 2010 9:04am
Subject:bzr push into mysql-5.5-bugteam branch (marc.alff:3097)
View as plain text  
 3097 Marc Alff	2010-10-26 [merge]
      local merge

    removed:
      mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size-master.opt
      mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size-master.opt
      mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size-master.opt
      storage/innobase/handler/mysql_addons.cc
      storage/innobase/include/mysql_addons.h
      storage/innobase/mysql-test/
      storage/innobase/mysql-test/patches/
      storage/innobase/mysql-test/patches/README
      storage/innobase/mysql-test/patches/index_merge_innodb-explain.diff
      storage/innobase/mysql-test/patches/information_schema.diff
      storage/innobase/mysql-test/patches/innodb_change_buffering_basic.diff
      storage/innobase/mysql-test/patches/innodb_file_per_table.diff
      storage/innobase/mysql-test/patches/innodb_lock_wait_timeout.diff
      storage/innobase/mysql-test/patches/innodb_thread_concurrency_basic.diff
      storage/innobase/mysql-test/patches/partition_innodb.diff
    added:
      mysql-test/extra/rpl_tests/rpl_stop_slave.test
      mysql-test/include/have_plugin_interface.inc
      mysql-test/include/have_plugin_server.inc
      mysql-test/r/lowercase_table4.result
      mysql-test/r/plugin_auth_qa.result
      mysql-test/r/plugin_auth_qa_1.result
      mysql-test/r/plugin_auth_qa_2.result
      mysql-test/r/plugin_auth_qa_3.result
      mysql-test/r/plugin_load_option.result
      mysql-test/suite/innodb/r/innodb-truncate.result
      mysql-test/suite/innodb/r/innodb_bug56143.result
      mysql-test/suite/innodb/r/innodb_bug56632.result
      mysql-test/suite/innodb/r/innodb_bug56680.result
      mysql-test/suite/innodb/r/innodb_bug57252.result
      mysql-test/suite/innodb/t/innodb-truncate.test
      mysql-test/suite/innodb/t/innodb_bug56143.test
      mysql-test/suite/innodb/t/innodb_bug56632.test
      mysql-test/suite/innodb/t/innodb_bug56680.test
      mysql-test/suite/innodb/t/innodb_bug57252.test
      mysql-test/suite/rpl/r/rpl_stop_slave.result
      mysql-test/suite/rpl/t/rpl_stop_slave.test
      mysql-test/t/lowercase_table4-master.opt
      mysql-test/t/lowercase_table4.test
      mysql-test/t/plugin_auth_qa-master.opt
      mysql-test/t/plugin_auth_qa.test
      mysql-test/t/plugin_auth_qa_1-master.opt
      mysql-test/t/plugin_auth_qa_1.test
      mysql-test/t/plugin_auth_qa_2-master.opt
      mysql-test/t/plugin_auth_qa_2.test
      mysql-test/t/plugin_auth_qa_3-master.opt
      mysql-test/t/plugin_auth_qa_3.test
      mysql-test/t/plugin_load_option-master.opt
      mysql-test/t/plugin_load_option.test
      plugin/auth/qa_auth_client.c
      plugin/auth/qa_auth_interface.c
      plugin/auth/qa_auth_server.c
    renamed:
      config/ac-macros/ha_ndbcluster.m4 => storage/ndb/ndb_configure.m4
    modified:
      BUILD/SETUP.sh
      CMakeLists.txt
      Makefile.am
      client/mysql.cc
      client/mysqlcheck.c
      client/mysqltest.cc
      client/sql_string.h
      cmake/abi_check.cmake
      cmake/build_configurations/mysql_release.cmake
      cmake/install_layout.cmake
      cmake/os/Linux.cmake
      cmd-line-utils/libedit/common.c
      cmd-line-utils/libedit/readline.c
      cmd-line-utils/libedit/vi.c
      cmd-line-utils/readline/complete.c
      cmd-line-utils/readline/histexpand.c
      cmd-line-utils/readline/histfile.c
      cmd-line-utils/readline/isearch.c
      cmd-line-utils/readline/parens.c
      cmd-line-utils/readline/readline.c
      cmd-line-utils/readline/terminal.c
      cmd-line-utils/readline/text.c
      config/ac-macros/maintainer.m4
      configure.cmake
      configure.in
      dbug/dbug.c
      include/my_compiler.h
      include/my_dbug.h
      include/my_getopt.h
      include/my_pthread.h
      include/mysql/client_plugin.h
      include/mysql/client_plugin.h.pp
      mysql-test/collections/default.experimental
      mysql-test/extra/binlog_tests/implicit.test
      mysql-test/extra/rpl_tests/create_recursive_construct.inc
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/extra/rpl_tests/rpl_row_sp003.test
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/include/check_concurrent_insert.inc
      mysql-test/include/check_no_concurrent_insert.inc
      mysql-test/include/get_relay_log_pos.inc
      mysql-test/include/index_merge2.inc
      mysql-test/include/kill_query.inc
      mysql-test/include/kill_query_and_diff_master_slave.inc
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/setup_fake_relay_log.inc
      mysql-test/include/show_events.inc
      mysql-test/include/show_rpl_debug_info.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/include/wait_for_slave_param.inc
      mysql-test/include/wait_for_slave_sql_error.inc
      mysql-test/include/wait_for_status_var.inc
      mysql-test/lib/mtr_misc.pl
      mysql-test/lib/mtr_process.pl
      mysql-test/mysql-test-run.pl
      mysql-test/r/cache_innodb.result
      mysql-test/r/delete.result
      mysql-test/r/func_math.result
      mysql-test/r/func_time.result
      mysql-test/r/grant.result
      mysql-test/r/grant3.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/information_schema.result
      mysql-test/r/ipv4_as_ipv6.result
      mysql-test/r/lock_sync.result
      mysql-test/r/mdl_sync.result
      mysql-test/r/merge.result
      mysql-test/r/mysqlcheck.result
      mysql-test/r/query_cache_debug.result
      mysql-test/r/select.result
      mysql-test/r/sp-security.result
      mysql-test/r/sp_trans.result
      mysql-test/r/trigger-trans.result
      mysql-test/r/type_datetime.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/suite/funcs_1/r/memory_storedproc_06.result
      mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
      mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
      mysql-test/suite/innodb/r/innodb-index.result
      mysql-test/suite/innodb/r/innodb-zip.result
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/suite/innodb/r/innodb_bug52745.result
      mysql-test/suite/innodb/r/innodb_bug53591.result
      mysql-test/suite/innodb/r/innodb_file_format.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb.test
      mysql-test/suite/innodb/t/innodb_mysql.test
      mysql-test/suite/parts/inc/partition_check.inc
      mysql-test/suite/parts/r/partition_alter3_innodb.result
      mysql-test/suite/parts/r/partition_basic_innodb.result
      mysql-test/suite/rpl/r/rpl_do_grant.result
      mysql-test/suite/rpl/r/rpl_heartbeat.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_sp003.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
      mysql-test/suite/rpl/t/rpl_do_grant.test
      mysql-test/suite/rpl/t/rpl_killed_ddl.test
      mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/r/foreign_key_checks_func.result
      mysql-test/suite/sys_vars/r/innodb_file_format_basic.result
      mysql-test/suite/sys_vars/t/all_vars.test
      mysql-test/suite/sys_vars/t/foreign_key_checks_func.test
      mysql-test/t/cache_innodb.test
      mysql-test/t/delete.test
      mysql-test/t/disabled.def
      mysql-test/t/func_math.test
      mysql-test/t/func_time.test
      mysql-test/t/grant.test
      mysql-test/t/grant3.test
      mysql-test/t/information_schema.test
      mysql-test/t/lock_sync.test
      mysql-test/t/mdl_sync.test
      mysql-test/t/merge.test
      mysql-test/t/mysqlcheck.test
      mysql-test/t/mysqltest.test
      mysql-test/t/query_cache_debug.test
      mysql-test/t/select.test
      mysql-test/t/sp-security.test
      mysql-test/t/sp_trans.test
      mysql-test/t/trigger-trans.test
      mysql-test/t/type_datetime.test
      mysql-test/t/wait_timeout.test
      mysys/my_gethostbyname.c
      mysys/my_gethwaddr.c
      mysys/my_getopt.c
      mysys/my_sync.c
      mysys/thr_mutex.c
      plugin/auth/CMakeLists.txt
      plugin/auth/Makefile.am
      plugin/auth/dialog.c
      regex/main.c
      sql-common/client.c
      sql/field.cc
      sql/ha_ndbcluster.cc
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/item_func.cc
      sql/item_strfunc.cc
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/key.cc
      sql/log.cc
      sql/log_event.cc
      sql/log_event.h
      sql/my_decimal.h
      sql/mysqld.cc
      sql/repl_failsafe.cc
      sql/repl_failsafe.h
      sql/rpl_rli.h
      sql/scheduler.h
      sql/share/errmsg-utf8.txt
      sql/slave.cc
      sql/sp.cc
      sql/sp.h
      sql/sp_head.cc
      sql/sql_acl.cc
      sql/sql_base.cc
      sql/sql_cache.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_help.cc
      sql/sql_insert.cc
      sql/sql_lex.h
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_partition_admin.cc
      sql/sql_partition_admin.h
      sql/sql_plugin.cc
      sql/sql_plugin.h
      sql/sql_show.cc
      sql/sql_show.h
      sql/sql_string.h
      sql/sql_truncate.cc
      sql/sql_truncate.h
      sql/sql_union.cc
      sql/sql_update.cc
      sql/sql_update.h
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/sys_vars.h
      sql/table.h
      storage/archive/ha_archive.cc
      storage/archive/ha_archive.h
      storage/blackhole/ha_blackhole.cc
      storage/blackhole/ha_blackhole.h
      storage/example/ha_example.cc
      storage/example/ha_example.h
      storage/federated/ha_federated.cc
      storage/federated/ha_federated.h
      storage/heap/ha_heap.cc
      storage/heap/ha_heap.h
      storage/ibmdb2i/db2i_constraints.cc
      storage/ibmdb2i/ha_ibmdb2i.cc
      storage/innobase/CMakeLists.txt
      storage/innobase/Makefile.am
      storage/innobase/btr/btr0cur.c
      storage/innobase/buf/buf0buddy.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/buf/buf0flu.c
      storage/innobase/buf/buf0lru.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0cur.h
      storage/innobase/include/buf0buddy.h
      storage/innobase/include/buf0buddy.ic
      storage/innobase/include/buf0buf.h
      storage/innobase/include/buf0flu.h
      storage/innobase/include/data0type.h
      storage/innobase/include/ibuf0ibuf.h
      storage/innobase/include/os0sync.h
      storage/innobase/include/rem0rec.h
      storage/innobase/include/row0mysql.h
      storage/innobase/include/row0row.h
      storage/innobase/include/row0upd.h
      storage/innobase/include/srv0srv.h
      storage/innobase/include/trx0trx.h
      storage/innobase/lock/lock0lock.c
      storage/innobase/log/log0log.c
      storage/innobase/os/os0file.c
      storage/innobase/os/os0sync.c
      storage/innobase/plug.in
      storage/innobase/rem/rem0rec.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0sel.c
      storage/innobase/row/row0upd.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/srv/srv0start.c
      storage/innobase/sync/sync0sync.c
      storage/innobase/trx/trx0i_s.c
      storage/innobase/trx/trx0trx.c
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisam/myisamchk.c
      storage/myisammrg/ha_myisammrg.cc
      storage/myisammrg/ha_myisammrg.h
      storage/ndb/plug.in
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/ha_perfschema.h
      strings/ctype-ucs2.c
      strings/my_vsnprintf.c
      unittest/examples/skip-t.c
      unittest/examples/skip_all-t.c
      unittest/examples/todo-t.c
      unittest/mytap/t/basic-t.c
      unittest/mytap/tap.c
      unittest/mytap/tap.h
      storage/ndb/ndb_configure.m4
=== modified file 'mysql-test/suite/perfschema/include/setup_helper.inc'
--- a/mysql-test/suite/perfschema/include/setup_helper.inc	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/include/setup_helper.inc	2010-10-07 00:03:27 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # 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
@@ -10,8 +10,8 @@
 # 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
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
 
 # Tests for PERFORMANCE_SCHEMA
 
@@ -26,17 +26,17 @@ update performance_schema.SETUP_CONSUMER
 connect (con1, localhost, root, , );
 
 let $con1_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID in (select connection_id())`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connect (con2, localhost, root, , );
 
 let $con2_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID in (select connection_id())`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connect (con3, localhost, root, , );
 
 let $con3_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID in (select connection_id())`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connection default;
 

=== modified file 'mysql-test/suite/perfschema/r/dml_threads.result'
--- a/mysql-test/suite/perfschema/r/dml_threads.result	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/r/dml_threads.result	2010-10-07 00:03:27 +0000
@@ -1,12 +1,12 @@
 select * from performance_schema.THREADS
 where name like 'Thread/%' limit 1;
-THREAD_ID	ID	NAME
+THREAD_ID	PROCESSLIST_ID	NAME
 #	#	#
 select * from performance_schema.THREADS
 where name='FOO';
-THREAD_ID	ID	NAME
+THREAD_ID	PROCESSLIST_ID	NAME
 insert into performance_schema.THREADS
-set name='FOO', thread_id=1, id=2;
+set name='FOO', thread_id=1, processlist_id=2;
 ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'THREADS'
 update performance_schema.THREADS
 set thread_id=12;

=== modified file 'mysql-test/suite/perfschema/r/func_file_io.result'
--- a/mysql-test/suite/perfschema/r/func_file_io.result	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/r/func_file_io.result	2010-10-07 00:03:27 +0000
@@ -94,24 +94,9 @@ FROM performance_schema.EVENTS_WAITS_SUM
 WHERE COUNT_STAR > 0
 ORDER BY SUM_TIMER_WAIT DESC
 LIMIT 10;
-SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
-# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-LEFT JOIN information_schema.PROCESSLIST i USING (ID)
-GROUP BY i.user
-ORDER BY SUM_WAIT DESC
-LIMIT 20;
 SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
 FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
 INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-WHERE p.ID = 1
+WHERE p.PROCESSLIST_ID = 1
 GROUP BY h.EVENT_NAME
 HAVING TOTAL_WAIT > 0;
-SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-LEFT JOIN information_schema.PROCESSLIST i USING (ID)
-GROUP BY i.user, h.operation
-HAVING BYTES > 0
-ORDER BY i.user, h.operation;

=== modified file 'mysql-test/suite/perfschema/r/selects.result'
--- a/mysql-test/suite/perfschema/r/selects.result	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/r/selects.result	2010-10-07 00:03:27 +0000
@@ -84,22 +84,22 @@ id	c
 13	[EVENT_ID]
 DROP TRIGGER t_ps_trigger;
 DROP PROCEDURE IF EXISTS t_ps_proc;
-CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT)
+CREATE PROCEDURE t_ps_proc(IN conid INT, OUT pid INT)
 BEGIN
-SELECT id FROM performance_schema.THREADS
-WHERE THREAD_ID = tid INTO pid;
+SELECT thread_id FROM performance_schema.THREADS
+WHERE PROCESSLIST_ID = conid INTO pid;
 END;
 |
-CALL t_ps_proc(0, @p_id);
+CALL t_ps_proc(connection_id(), @p_id);
 DROP FUNCTION IF EXISTS t_ps_proc;
-CREATE FUNCTION t_ps_func(tid INT) RETURNS int
+CREATE FUNCTION t_ps_func(conid INT) RETURNS int
 BEGIN
-return (SELECT id FROM performance_schema.THREADS
-WHERE THREAD_ID = tid);
+return (SELECT thread_id FROM performance_schema.THREADS
+WHERE PROCESSLIST_ID = conid);
 END;
 |
-SELECT t_ps_func(0) = @p_id;
-t_ps_func(0) = @p_id
+SELECT t_ps_func(connection_id()) = @p_id;
+t_ps_func(connection_id()) = @p_id
 1
 SELECT * FROM t_event;
 EVENT_ID

=== modified file 'mysql-test/suite/perfschema/t/dml_threads.test'
--- a/mysql-test/suite/perfschema/t/dml_threads.test	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/t/dml_threads.test	2010-10-07 00:03:27 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # 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
@@ -10,8 +10,8 @@
 # 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
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
 
 # Tests for PERFORMANCE_SCHEMA
 
@@ -28,7 +28,7 @@ select * from performance_schema.THREADS
 --replace_result '\'threads' '\'THREADS'
 --error ER_TABLEACCESS_DENIED_ERROR
 insert into performance_schema.THREADS
-  set name='FOO', thread_id=1, id=2;
+  set name='FOO', thread_id=1, processlist_id=2;
 
 --replace_result '\'threads' '\'THREADS'
 --error ER_TABLEACCESS_DENIED_ERROR

=== modified file 'mysql-test/suite/perfschema/t/func_file_io.test'
--- a/mysql-test/suite/perfschema/t/func_file_io.test	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/t/func_file_io.test	2010-10-07 00:03:27 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Sun Microsystems, Inc
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # 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
@@ -10,8 +10,8 @@
 # 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
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
 
 ##
 ## WL#4814, 4.1.4 FILE IO
@@ -154,16 +154,16 @@ LIMIT 10;
 # Total and average wait time for different users
 #
 
---disable_result_log
-SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
-# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-LEFT JOIN information_schema.PROCESSLIST i USING (ID)
-GROUP BY i.user
-ORDER BY SUM_WAIT DESC
-LIMIT 20;
---enable_result_log
+## --disable_result_log
+## SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
+## # ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
+## FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
+## INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
+## LEFT JOIN information_schema.PROCESSLIST i USING (ID)
+## GROUP BY i.user
+## ORDER BY SUM_WAIT DESC
+## LIMIT 20;
+## --enable_result_log
 
 #
 # Total and average wait times for different events for a session
@@ -172,7 +172,7 @@ LIMIT 20;
 SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
 FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
 INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-WHERE p.ID = 1
+WHERE p.PROCESSLIST_ID = 1
 GROUP BY h.EVENT_NAME
 HAVING TOTAL_WAIT > 0;
 --enable_result_log
@@ -181,12 +181,12 @@ HAVING TOTAL_WAIT > 0;
 # Which user reads and writes data
 #
 
---disable_result_log
-SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-LEFT JOIN information_schema.PROCESSLIST i USING (ID)
-GROUP BY i.user, h.operation
-HAVING BYTES > 0
-ORDER BY i.user, h.operation;
---enable_result_log
+## --disable_result_log
+## SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
+## FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
+## INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
+## LEFT JOIN information_schema.PROCESSLIST i USING (ID)
+## GROUP BY i.user, h.operation
+## HAVING BYTES > 0
+## ORDER BY i.user, h.operation;
+## --enable_result_log

=== modified file 'mysql-test/suite/perfschema/t/selects.test'
--- a/mysql-test/suite/perfschema/t/selects.test	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/t/selects.test	2010-10-07 00:03:27 +0000
@@ -136,17 +136,17 @@ DROP PROCEDURE IF EXISTS t_ps_proc;
 --enable_warnings
 delimiter |;
 
-CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT)
+CREATE PROCEDURE t_ps_proc(IN conid INT, OUT pid INT)
 BEGIN
-   SELECT id FROM performance_schema.THREADS
-   WHERE THREAD_ID = tid INTO pid;
+   SELECT thread_id FROM performance_schema.THREADS
+   WHERE PROCESSLIST_ID = conid INTO pid;
 END;
 
 |
 
 delimiter ;|
 
-CALL t_ps_proc(0, @p_id);
+CALL t_ps_proc(connection_id(), @p_id);
 
 # FUNCTION
 
@@ -155,17 +155,17 @@ DROP FUNCTION IF EXISTS t_ps_proc;
 --enable_warnings
 delimiter |;
 
-CREATE FUNCTION t_ps_func(tid INT) RETURNS int
+CREATE FUNCTION t_ps_func(conid INT) RETURNS int
 BEGIN
-   return (SELECT id FROM performance_schema.THREADS
-           WHERE THREAD_ID = tid);
+   return (SELECT thread_id FROM performance_schema.THREADS
+           WHERE PROCESSLIST_ID = conid);
 END;
 
 |
 
 delimiter ;|
 
-SELECT t_ps_func(0) = @p_id;
+SELECT t_ps_func(connection_id()) = @p_id;
 
 # We might reach this point too early which means the event scheduler has not
 # execute our "t_ps_event". Therefore we poll till the record was inserted

=== modified file 'mysql-test/suite/perfschema/t/thread_cache.test'
--- a/mysql-test/suite/perfschema/t/thread_cache.test	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/t/thread_cache.test	2010-10-07 00:03:27 +0000
@@ -31,14 +31,14 @@ connect (con1, localhost, root, , );
 let $con1_ID=`select connection_id()`;
 
 let $con1_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID = connection_id()`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connect (con2, localhost, root, , );
 
 let $con2_ID=`select connection_id()`;
 
 let $con2_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID = connection_id()`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connection default;
 
@@ -59,7 +59,7 @@ connect (con3, localhost, root, , );
 let $con3_ID=`select connection_id()`;
 
 let $con3_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID = connection_id()`;
+  where PROCESSLIST_ID = connection_id()`;
 
 disconnect con3;
 disconnect con1;
@@ -83,14 +83,14 @@ connect (con1, localhost, root, , );
 let $con1_ID=`select connection_id()`;
 
 let $con1_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID = connection_id()`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connect (con2, localhost, root, , );
 
 let $con2_ID=`select connection_id()`;
 
 let $con2_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID = connection_id()`;
+  where PROCESSLIST_ID = connection_id()`;
 
 connection default;
 
@@ -109,7 +109,7 @@ connect (con3, localhost, root, , );
 let $con3_ID=`select connection_id()`;
 
 let $con3_THREAD_ID=`select thread_id from performance_schema.THREADS
-  where ID = connection_id()`;
+  where PROCESSLIST_ID = connection_id()`;
 
 disconnect con3;
 disconnect con1;

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2010-09-20 14:17:32 +0000
+++ b/scripts/mysql_system_tables.sql	2010-10-07 00:03:27 +0000
@@ -467,8 +467,8 @@ DROP PREPARE stmt;
 
 SET @l1="CREATE TABLE performance_schema.THREADS(";
 SET @l2="THREAD_ID INTEGER not null,";
-SET @l3="ID INTEGER not null,";
-SET @l4="NAME VARCHAR(64) not null";
+SET @l3="PROCESSLIST_ID INTEGER,";
+SET @l4="NAME VARCHAR(128) not null";
 SET @l5=")ENGINE=PERFORMANCE_SCHEMA;";
 
 SET @cmd=concat(@l1,@l2,@l3,@l4,@l5);

=== modified file 'storage/perfschema/table_threads.cc'
--- a/storage/perfschema/table_threads.cc	2010-08-12 14:08:52 +0000
+++ b/storage/perfschema/table_threads.cc	2010-10-07 00:03:27 +0000
@@ -34,13 +34,13 @@ static const TABLE_FIELD_TYPE field_type
     { NULL, 0}
   },
   {
-    { C_STRING_WITH_LEN("ID") },
+    { C_STRING_WITH_LEN("PROCESSLIST_ID") },
     { C_STRING_WITH_LEN("int(11)") },
     { NULL, 0}
   },
   {
     { C_STRING_WITH_LEN("NAME") },
-    { C_STRING_WITH_LEN("varchar(64)") },
+    { C_STRING_WITH_LEN("varchar(128)") },
     { NULL, 0}
   }
 };
@@ -140,7 +140,7 @@ void table_threads::make_row(PFS_thread 
 }
 
 int table_threads::read_row_values(TABLE *table,
-                                   unsigned char *,
+                                   unsigned char *buf,
                                    Field **fields,
                                    bool read_all)
 {
@@ -150,7 +150,8 @@ int table_threads::read_row_values(TABLE
     return HA_ERR_RECORD_DELETED;
 
   /* Set the null bits */
-  DBUG_ASSERT(table->s->null_bytes == 0);
+  DBUG_ASSERT(table->s->null_bytes == 1);
+  buf[0]= 0;
 
   for (; (f= *fields) ; fields++)
   {
@@ -161,7 +162,7 @@ int table_threads::read_row_values(TABLE
       case 0: /* THREAD_ID */
         set_field_ulong(f, m_row.m_thread_internal_id);
         break;
-      case 1: /* ID */
+      case 1: /* PROCESSLIST_ID */
         set_field_ulong(f, m_row.m_thread_id);
         break;
       case 2: /* NAME */

=== modified file 'storage/perfschema/table_threads.h'
--- a/storage/perfschema/table_threads.h	2010-08-12 14:08:52 +0000
+++ b/storage/perfschema/table_threads.h	2010-10-07 00:03:27 +0000
@@ -36,7 +36,7 @@ struct row_threads
 {
   /** Column THREAD_ID. */
   ulong m_thread_internal_id;
-  /** Column ID. */
+  /** Column PROCESSLIST_ID. */
   ulong m_thread_id;
   /** Column NAME. */
   const char *m_name;
@@ -79,7 +79,7 @@ private:
 
   /** Current row. */
   row_threads m_row;
-  /** True is the current row exists. */
+  /** True if the current row exists. */
   bool m_row_exists;
   /** Current position. */
   PFS_simple_index m_pos;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-bugteam branch (marc.alff:3097) Marc Alff26 Oct