List:Commits« Previous MessageNext Message »
From:Marc Alff Date:June 2 2010 8:32am
Subject:bzr push into mysql-next-mr-wl4895 branch (marc.alff:3152 to 3153) WL#4895
View as plain text  
 3153 Marc Alff	2010-06-02
      WL#4895 PERFORMANCE SCHEMA TABLE IO
      
      Implemented code review comments.
      
      In particular:
      - cleaned up every "position" iterators to start at FIRST_VIEW and end at LAST_VIEW
      - moved iterator specific constants from pfs_engine_table.h to table_helper.h

    added:
      storage/perfschema/table_helper.h
    modified:
      storage/perfschema/CMakeLists.txt
      storage/perfschema/Makefile.am
      storage/perfschema/pfs_engine_table.h
      storage/perfschema/table_all_instr.h
      storage/perfschema/table_events_waits_summary.h
      storage/perfschema/table_setup_instruments.h
      storage/perfschema/table_setup_objects.h
 3152 Marc Alff	2010-05-28 [merge]
      Merge mysql-next-mr --> mysql-next-mr-wl4895

    added:
      mysql-test/extra/rpl_tests/rpl_record_compare.test
      mysql-test/r/bug46261.result
      mysql-test/std_data/binlog_savepoint.000001
      mysql-test/std_data/bug46565.ARZ
      mysql-test/std_data/bug46565.frm
      mysql-test/suite/parts/r/partition_debug_sync_innodb.result
      mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
      mysql-test/suite/parts/t/partition_debug_sync_innodb.test
      mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
      mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
      mysql-test/suite/rpl/t/rpl_begin_commit_rollback-master.opt
      mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test
      mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test
      mysql-test/suite/sys_vars/r/secure_file_priv.result
      mysql-test/suite/sys_vars/r/skip_name_resolve_basic.result
      mysql-test/suite/sys_vars/t/secure_file_priv-master.opt
      mysql-test/suite/sys_vars/t/secure_file_priv.test
      mysql-test/suite/sys_vars/t/skip_name_resolve_basic-master.opt
      mysql-test/suite/sys_vars/t/skip_name_resolve_basic.test
      mysql-test/t/bug46261-master.opt
      mysql-test/t/bug46261.test
    modified:
      Makefile.am
      client/mysqlbinlog.cc
      configure.in
      include/my_global.h
      include/mysql/plugin.h
      include/mysql/plugin.h.pp
      include/mysql_com.h
      mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
      mysql-test/mysql-test-run.pl
      mysql-test/r/archive.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/delete.result
      mysql-test/r/error_simulation.result
      mysql-test/r/explain.result
      mysql-test/r/fulltext.result
      mysql-test/r/func_concat.result
      mysql-test/r/func_gconcat.result
      mysql-test/r/func_str.result
      mysql-test/r/gis-rtree.result
      mysql-test/r/grant.result
      mysql-test/r/group_by.result
      mysql-test/r/handler_myisam.result
      mysql-test/r/having.result
      mysql-test/r/innodb_mysql.result
      mysql-test/r/join.result
      mysql-test/r/join_outer.result
      mysql-test/r/loaddata.result
      mysql-test/r/log_state.result
      mysql-test/r/myisam.result
      mysql-test/r/mysqlbinlog.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqldump.result
      mysql-test/r/outfile_loaddata.result
      mysql-test/r/partition.result
      mysql-test/r/ps.result
      mysql-test/r/query_cache_with_views.result
      mysql-test/r/range.result
      mysql-test/r/renamedb.result
      mysql-test/r/row.result
      mysql-test/r/skip_name_resolve.result
      mysql-test/r/subselect.result
      mysql-test/r/symlink.result
      mysql-test/r/trigger.result
      mysql-test/r/upgrade.result
      mysql-test/r/variables.result
      mysql-test/r/variables_debug.result
      mysql-test/r/view.result
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
      mysql-test/suite/engines/README
      mysql-test/suite/engines/iuds/r/update_delete_calendar.result
      mysql-test/suite/engines/iuds/t/disabled.def
      mysql-test/suite/engines/iuds/t/insert_number.test
      mysql-test/suite/engines/iuds/t/update_delete_calendar.test
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
      mysql-test/suite/rpl/r/rpl_do_grant.result
      mysql-test/suite/rpl/r/rpl_events.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
      mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
      mysql-test/suite/rpl/t/rpl_do_grant.test
      mysql-test/suite/rpl/t/rpl_events.test
      mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
      mysql-test/suite/rpl_ndb/my.cnf
      mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test
      mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result
      mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
      mysql-test/suite/sys_vars/t/secure_file_priv_basic.test
      mysql-test/t/archive.test
      mysql-test/t/ctype_ucs.test
      mysql-test/t/delete.test
      mysql-test/t/error_simulation.test
      mysql-test/t/explain.test
      mysql-test/t/fulltext.test
      mysql-test/t/func_concat.test
      mysql-test/t/func_gconcat.test
      mysql-test/t/func_str.test
      mysql-test/t/gis-rtree.test
      mysql-test/t/grant.test
      mysql-test/t/group_by.test
      mysql-test/t/handler_myisam.test
      mysql-test/t/having.test
      mysql-test/t/innodb_mysql.test
      mysql-test/t/join.test
      mysql-test/t/join_outer.test
      mysql-test/t/loaddata.test
      mysql-test/t/log_state.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqldump.test
      mysql-test/t/outfile_loaddata.test
      mysql-test/t/partition.test
      mysql-test/t/ps.test
      mysql-test/t/query_cache_with_views.test
      mysql-test/t/range.test
      mysql-test/t/renamedb.test
      mysql-test/t/row.test
      mysql-test/t/skip_name_resolve.test
      mysql-test/t/subselect.test
      mysql-test/t/symlink.test
      mysql-test/t/trigger.test
      mysql-test/t/upgrade.test
      mysql-test/t/variables.test
      mysql-test/t/variables_debug.test
      mysql-test/t/view.test
      mysys/mf_loadpath.c
      mysys/mf_pack.c
      mysys/my_file.c
      mysys/my_getwd.c
      scripts/mysqld_safe.sh
      scripts/mysqlhotcopy.sh
      sql-common/client.c
      sql/CMakeLists.txt
      sql/authors.h
      sql/events.cc
      sql/field.cc
      sql/field.h
      sql/field_conv.cc
      sql/ha_partition.cc
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/item.h
      sql/item_cmpfunc.h
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/item_subselect.cc
      sql/item_subselect.h
      sql/item_sum.cc
      sql/log.cc
      sql/log.h
      sql/log_event.cc
      sql/log_event.h
      sql/log_event_old.cc
      sql/mysqld.cc
      sql/mysqld.h
      sql/net_serv.cc
      sql/opt_range.cc
      sql/opt_range.h
      sql/opt_sum.cc
      sql/partition_info.cc
      sql/protocol.cc
      sql/slave.cc
      sql/sp_head.cc
      sql/sp_head.h
      sql/sql_acl.cc
      sql/sql_base.cc
      sql/sql_base.h
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_connect.cc
      sql/sql_delete.cc
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_plugin.cc
      sql/sql_repl.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_table.h
      sql/sql_update.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/table.cc
      sql/table.h
      storage/archive/ha_archive.cc
      storage/myisam/ha_myisam.cc
      storage/myisam/mi_check.c
      storage/myisam/mi_delete_all.c
      storage/myisam/mi_delete_table.c
      storage/myisam/mi_dynrec.c
      storage/myisam/mi_extra.c
      storage/myisam/mi_open.c
      storage/myisam/mi_page.c
      storage/myisam/mi_rnext.c
      storage/myisam/mi_write.c
      storage/myisam/myisamdef.h
      storage/myisam/rt_index.c
      storage/myisam/rt_split.c
      storage/myisam/sort.c
      tests/mysql_client_test.c
=== modified file 'storage/perfschema/CMakeLists.txt'
--- a/storage/perfschema/CMakeLists.txt	2010-04-19 12:26:29 +0000
+++ b/storage/perfschema/CMakeLists.txt	2010-06-02 08:31:27 +0000
@@ -41,6 +41,7 @@ SET(PERFSCHEMA_SOURCES ha_perfschema.h
   table_events_waits_summary.h
   table_file_instances.h
   table_file_summary.h
+  table_helper.h
   table_performance_timers.h
   table_processlist.h
   table_setup_consumers.h

=== modified file 'storage/perfschema/Makefile.am'
--- a/storage/perfschema/Makefile.am	2010-04-19 12:26:29 +0000
+++ b/storage/perfschema/Makefile.am	2010-06-02 08:31:27 +0000
@@ -37,7 +37,7 @@ noinst_HEADERS = ha_perfschema.h pfs_eng
 		pfs_global.h pfs_instr_class.h pfs_instr.h \
                 pfs_column_types.h pfs_column_values.h \
                 table_setup_instruments.h table_performance_timers.h \
-                table_setup_timers.h \
+                table_setup_timers.h table_helper.h \
                 table_setup_consumers.h table_events_waits.h \
 		pfs_events_waits.h pfs_timer.h table_processlist.h \
 		table_sync_instances.h \

=== modified file 'storage/perfschema/pfs_engine_table.h'
--- a/storage/perfschema/pfs_engine_table.h	2010-04-26 09:27:44 +0000
+++ b/storage/perfschema/pfs_engine_table.h	2010-06-02 08:31:27 +0000
@@ -293,22 +293,6 @@ struct PFS_triple_index
   }
 };
 
-struct PFS_instrument_view_constants
-{
-  static const uint VIEW_MUTEX= 1;
-  static const uint VIEW_RWLOCK= 2;
-  static const uint VIEW_COND= 3;
-  static const uint VIEW_FILE= 4;
-};
-
-struct PFS_object_view_constants
-{
-  static const uint VIEW_TABLE= 1;
-  static const uint VIEW_EVENT= 2;
-  static const uint VIEW_PROCEDURE= 3;
-  static const uint VIEW_FUNCTION= 4;
-};
-
 bool pfs_show_status(handlerton *hton, THD *thd,
                      stat_print_fn *print, enum ha_stat_type stat);
 

=== modified file 'storage/perfschema/table_all_instr.h'
--- a/storage/perfschema/table_all_instr.h	2010-04-26 09:27:44 +0000
+++ b/storage/perfschema/table_all_instr.h	2010-06-02 08:31:27 +0000
@@ -24,6 +24,7 @@
 #include "pfs_instr_class.h"
 #include "pfs_instr.h"
 #include "pfs_engine_table.h"
+#include "table_helper.h"
 
 /**
   @addtogroup Performance_schema_tables
@@ -35,17 +36,17 @@ struct pos_all_instr_class : public PFS_
                              public PFS_instrument_view_constants
 {
   pos_all_instr_class()
-    : PFS_double_index(VIEW_MUTEX, 1)
+    : PFS_double_index(FIRST_VIEW, 1)
   {}
 
   inline void reset(void)
   {
-    m_index_1= VIEW_MUTEX;
+    m_index_1= FIRST_VIEW;
     m_index_2= 1;
   }
 
   inline bool has_more_view(void)
-  { return (m_index_1 <= VIEW_FILE); }
+  { return (m_index_1 <= LAST_VIEW); }
 
   inline void next_view(void)
   {
@@ -95,17 +96,17 @@ struct pos_all_instr : public PFS_double
                        public PFS_instrument_view_constants
 {
   pos_all_instr()
-    : PFS_double_index(VIEW_MUTEX, 0)
+    : PFS_double_index(FIRST_VIEW, 0)
   {}
 
   inline void reset(void)
   {
-    m_index_1= VIEW_MUTEX;
+    m_index_1= FIRST_VIEW;
     m_index_2= 0;
   }
 
   inline bool has_more_view(void)
-  { return (m_index_1 <= VIEW_FILE); }
+  { return (m_index_1 <= LAST_VIEW); }
 
   inline void next_view(void)
   {

=== modified file 'storage/perfschema/table_events_waits_summary.h'
--- a/storage/perfschema/table_events_waits_summary.h	2010-04-26 09:27:44 +0000
+++ b/storage/perfschema/table_events_waits_summary.h	2010-06-02 08:31:27 +0000
@@ -26,6 +26,7 @@
 #include "pfs_instr_class.h"
 #include "pfs_instr.h"
 #include "table_all_instr.h"
+#include "table_helper.h"
 
 /**
   @addtogroup Performance_schema_tables
@@ -64,13 +65,13 @@ struct pos_events_waits_summary_by_threa
 : public PFS_triple_index, public PFS_instrument_view_constants
 {
   pos_events_waits_summary_by_thread_by_event_name()
-    : PFS_triple_index(0, VIEW_MUTEX, 1)
+    : PFS_triple_index(0, FIRST_VIEW, 1)
   {}
 
   inline void reset(void)
   {
     m_index_1= 0;
-    m_index_2= VIEW_MUTEX;
+    m_index_2= FIRST_VIEW;
     m_index_3= 1;
   }
 
@@ -78,12 +79,12 @@ struct pos_events_waits_summary_by_threa
   { return (m_index_1 < thread_max); }
 
   inline bool has_more_view(void)
-  { return (m_index_2 <= VIEW_FILE); }
+  { return (m_index_2 <= LAST_VIEW); }
 
   inline void next_thread(void)
   {
     m_index_1++;
-    m_index_2= VIEW_MUTEX;
+    m_index_2= FIRST_VIEW;
     m_index_3= 1;
   }
 

=== added file 'storage/perfschema/table_helper.h'
--- a/storage/perfschema/table_helper.h	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/table_helper.h	2010-06-02 08:31:27 +0000
@@ -0,0 +1,55 @@
+/* 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
+  the Free Software Foundation; version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+
+#ifndef PFS_TABLE_HELPER_H
+#define PFS_TABLE_HELPER_H
+
+/**
+  @file storage/perfschema/table_helper.h
+  Performance schema table helpers (declarations).
+*/
+
+/**
+  @addtogroup Performance_schema_tables
+  @{
+*/
+
+struct PFS_instrument_view_constants
+{
+  static const uint FIRST_VIEW= 1;
+  static const uint VIEW_MUTEX= 1;
+  static const uint VIEW_RWLOCK= 2;
+  static const uint VIEW_COND= 3;
+  static const uint VIEW_FILE= 4;
+  static const uint VIEW_TABLE= 5;
+  static const uint LAST_VIEW= 5;
+};
+
+struct PFS_object_view_constants
+{
+  static const uint FIRST_VIEW= 1;
+  static const uint VIEW_TABLE= 1;
+  static const uint LAST_VIEW= 1;
+
+  /* Future use */
+  static const uint VIEW_EVENT= 2;
+  static const uint VIEW_PROCEDURE= 3;
+  static const uint VIEW_FUNCTION= 4;
+};
+
+/** @} */
+
+#endif
+

=== modified file 'storage/perfschema/table_setup_instruments.h'
--- a/storage/perfschema/table_setup_instruments.h	2010-05-05 08:16:47 +0000
+++ b/storage/perfschema/table_setup_instruments.h	2010-06-02 08:31:27 +0000
@@ -45,6 +45,7 @@ struct row_setup_instruments
 /** Position of a cursor on PERFORMANCE_SCHEMA.SETUP_INSTRUMENTS. */
 struct pos_setup_instruments : public PFS_double_index
 {
+  static const uint FIRST_VIEW= 1;
   static const uint VIEW_MUTEX= 1;
   static const uint VIEW_RWLOCK= 2;
   static const uint VIEW_COND= 3;
@@ -52,19 +53,20 @@ struct pos_setup_instruments : public PF
   static const uint VIEW_THREAD= 4;
   static const uint VIEW_FILE= 5;
   static const uint VIEW_TABLE= 6;
+  static const uint LAST_VIEW= 6;
 
   pos_setup_instruments()
-    : PFS_double_index(VIEW_MUTEX, 1)
+    : PFS_double_index(FIRST_VIEW, 1)
   {}
 
   inline void reset(void)
   {
-    m_index_1= VIEW_MUTEX;
+    m_index_1= FIRST_VIEW;
     m_index_2= 1;
   }
 
   inline bool has_more_view(void)
-  { return (m_index_1 <= VIEW_TABLE); }
+  { return (m_index_1 <= LAST_VIEW); }
 
   inline void next_view(void)
   {

=== modified file 'storage/perfschema/table_setup_objects.h'
--- a/storage/perfschema/table_setup_objects.h	2010-04-19 12:26:29 +0000
+++ b/storage/perfschema/table_setup_objects.h	2010-06-02 08:31:27 +0000
@@ -23,6 +23,7 @@
 
 #include "pfs_instr_class.h"
 #include "pfs_engine_table.h"
+#include "table_helper.h"
 
 /**
   @addtogroup Performance_schema_tables
@@ -53,17 +54,17 @@ struct pos_setup_objects : public PFS_do
                            public PFS_object_view_constants
 {
   pos_setup_objects()
-    : PFS_double_index(VIEW_TABLE, 0)
+    : PFS_double_index(FIRST_VIEW, 0)
   {}
 
   inline void reset(void)
   {
-    m_index_1= VIEW_TABLE;
+    m_index_1= FIRST_VIEW;
     m_index_2= 0;
   }
 
   inline bool has_more_view(void)
-  { return (m_index_1 <= VIEW_FUNCTION); }
+  { return (m_index_1 <= LAST_VIEW); }
 
   inline void next_view(void)
   {


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100602083127-zsqty7a8698m6oza.bundle
Thread
bzr push into mysql-next-mr-wl4895 branch (marc.alff:3152 to 3153) WL#4895Marc Alff2 Jun