List:Commits« Previous MessageNext Message »
From:Marc Alff Date:May 25 2010 8:20am
Subject:bzr push into mysql-next-mr-wl4895 branch (marc.alff:3150 to 3151) WL#4895
View as plain text  
 3151 Marc Alff	2010-05-25
      WL#4895 PERFORMANCE SCHEMA TABLE IO
      
      Implemented code review comments:
      - move the implementation of handler::ha_rnd_next() and related to handler.cc
      - add instrumentation for rnd_pos

    modified:
      mysql-test/suite/perfschema/r/myisam_table_io.result
      sql/filesort.cc
      sql/ha_partition.cc
      sql/handler.cc
      sql/handler.h
      sql/log_event.cc
      sql/log_event_old.cc
      sql/opt_range.cc
      sql/records.cc
      sql/sql_insert.cc
      sql/sql_select.cc
      sql/sql_update.cc
 3150 Marc Alff	2010-05-20 [merge]
      Merge mysql-next-mr --> mysql-next-mr-wl4895

    added:
      include/waiting_threads.h
      mysql-test/suite/funcs_1/r/row_count_func.result
      mysql-test/suite/funcs_1/t/row_count_func-master.opt
      mysql-test/suite/funcs_1/t/row_count_func.test
      mysql-test/suite/rpl/r/rpl_show_master_info_file.result
      mysql-test/suite/rpl/t/rpl_show_master_info_file-master.opt
      mysql-test/suite/rpl/t/rpl_show_master_info_file.test
      mysys/waiting_threads.c
      unittest/mysys/waiting_threads-t.c
    modified:
      BUILD/Makefile.am
      CMakeLists.txt
      Docs/Makefile.am
      Makefile.am
      client/Makefile.am
      cmake/build_configurations/mysql_release.cmake
      cmake/install_layout.cmake
      cmake/install_macros.cmake
      cmake/mysql_version.cmake
      cmake/plugin.cmake
      cmd-line-utils/Makefile.am
      cmd-line-utils/readline/Makefile.am
      config.h.cmake
      extra/Makefile.am
      extra/yassl/Makefile.am
      extra/yassl/src/Makefile.am
      extra/yassl/taocrypt/Makefile.am
      extra/yassl/taocrypt/benchmark/Makefile.am
      extra/yassl/taocrypt/src/Makefile.am
      extra/yassl/taocrypt/test/Makefile.am
      extra/yassl/testsuite/Makefile.am
      include/Makefile.am
      include/my_global.h
      include/my_pthread.h
      libmysql/CMakeLists.txt
      libmysql/Makefile.am
      libmysql/Makefile.shared
      libmysql_r/Makefile.am
      libmysqld/CMakeLists.txt
      libmysqld/Makefile.am
      libmysqld/examples/CMakeLists.txt
      libmysqld/examples/Makefile.am
      man/CMakeLists.txt
      man/Makefile.am
      mysql-test/CMakeLists.txt
      mysql-test/Makefile.am
      mysql-test/collections/default.experimental
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
      mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
      mysql-test/include/ctype_numconv.inc
      mysql-test/include/mysqld--help.inc
      mysql-test/include/show_slave_status.inc
      mysql-test/include/show_slave_status2.inc
      mysql-test/include/test_fieldsize.inc
      mysql-test/lib/My/SafeProcess/Makefile.am
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/information_schema.result
      mysql-test/r/mysql_client_test.result
      mysql-test/r/partition.result
      mysql-test/r/sp.result
      mysql-test/r/trigger.result
      mysql-test/r/variables_debug.result
      mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
      mysql-test/suite/funcs_1/r/memory_storedproc_10.result
      mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
      mysql-test/suite/parts/r/rpl_partition.result
      mysql-test/suite/parts/t/rpl_partition.test
      mysql-test/suite/rpl/r/rpl_000015.result
      mysql-test/suite/rpl/r/rpl_bug33931.result
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
      mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
      mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
      mysql-test/suite/rpl/r/rpl_flushlog_loop.result
      mysql-test/suite/rpl/r/rpl_grant.result
      mysql-test/suite/rpl/r/rpl_heartbeat.result
      mysql-test/suite/rpl/r/rpl_incident.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
      mysql-test/suite/rpl/r/rpl_replicate_do.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/r/rpl_row_colSize.result
      mysql-test/suite/rpl/r/rpl_row_log.result
      mysql-test/suite/rpl/r/rpl_row_log_innodb.result
      mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
      mysql-test/suite/rpl/r/rpl_row_reset_slave.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_until.result
      mysql-test/suite/rpl/r/rpl_skip_error.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/r/rpl_ssl.result
      mysql-test/suite/rpl/r/rpl_ssl1.result
      mysql-test/suite/rpl/r/rpl_stm_log.result
      mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
      mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
      mysql-test/suite/rpl/r/rpl_stm_until.result
      mysql-test/suite/rpl/r/rpl_temporary_errors.result
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/suite/rpl/t/rpl_bug33931.test
      mysql-test/suite/rpl/t/rpl_flushlog_loop.test
      mysql-test/suite/rpl/t/rpl_incident.test
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
      mysql-test/suite/rpl/t/rpl_replicate_do.test
      mysql-test/suite/rpl/t/rpl_row_until.test
      mysql-test/suite/rpl/t/rpl_slave_skip.test
      mysql-test/suite/rpl/t/rpl_ssl.test
      mysql-test/suite/rpl/t/rpl_ssl1.test
      mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
      mysql-test/t/information_schema.test
      mysql-test/t/mysql_client_test.test
      mysql-test/t/parser_stack.test
      mysql-test/t/partition.test
      mysql-test/t/trigger.test
      mysql-test/t/variables_debug.test
      mysys/CMakeLists.txt
      mysys/Makefile.am
      netware/Makefile.am
      plugin/Makefile.am
      plugin/audit_null/CMakeLists.txt
      plugin/daemon_example/Makefile.am
      plugin/fulltext/CMakeLists.txt
      plugin/fulltext/Makefile.am
      pstack/Makefile.am
      pstack/aout/Makefile.am
      regex/Makefile.am
      scripts/CMakeLists.txt
      scripts/Makefile.am
      scripts/mysqld_safe.sh
      sql-bench/CMakeLists.txt
      sql-bench/Makefile.am
      sql-common/Makefile.am
      sql/Makefile.am
      sql/ha_ndbcluster_binlog.cc
      sql/item_func.cc
      sql/log_event.cc
      sql/protocol.cc
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/share/Makefile.am
      sql/slave.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_parse.cc
      sql/sql_parse.h
      sql/sql_signal.cc
      sql/sql_update.cc
      storage/Makefile.am
      storage/archive/Makefile.am
      storage/blackhole/Makefile.am
      storage/csv/Makefile.am
      storage/example/Makefile.am
      storage/federated/Makefile.am
      storage/heap/Makefile.am
      storage/ibmdb2i/Makefile.am
      storage/innobase/Makefile.am
      storage/myisam/Makefile.am
      storage/myisammrg/Makefile.am
      storage/ndb/Makefile.am
      storage/ndb/docs/Makefile.am
      storage/ndb/include/Makefile.am
      storage/ndb/src/Makefile.am
      storage/ndb/src/common/Makefile.am
      storage/ndb/src/common/debugger/Makefile.am
      storage/ndb/src/common/debugger/signaldata/Makefile.am
      storage/ndb/src/common/logger/Makefile.am
      storage/ndb/src/common/mgmcommon/Makefile.am
      storage/ndb/src/common/portlib/Makefile.am
      storage/ndb/src/common/transporter/Makefile.am
      storage/ndb/src/common/util/Makefile.am
      storage/ndb/src/cw/Makefile.am
      storage/ndb/src/cw/cpcd/Makefile.am
      storage/ndb/src/kernel/Makefile.am
      storage/ndb/src/kernel/blocks/Makefile.am
      storage/ndb/src/kernel/blocks/backup/Makefile.am
      storage/ndb/src/kernel/blocks/dbdict/Makefile.am
      storage/ndb/src/kernel/blocks/dbdih/Makefile.am
      storage/ndb/src/kernel/blocks/dblqh/Makefile.am
      storage/ndb/src/kernel/blocks/dbtup/Makefile.am
      storage/ndb/src/kernel/error/Makefile.am
      storage/ndb/src/kernel/vm/Makefile.am
      storage/ndb/src/mgmapi/Makefile.am
      storage/ndb/src/mgmclient/Makefile.am
      storage/ndb/src/mgmsrv/Makefile.am
      storage/ndb/src/ndbapi/Makefile.am
      storage/ndb/test/Makefile.am
      storage/ndb/test/ndbapi/Makefile.am
      storage/ndb/test/ndbapi/bank/Makefile.am
      storage/ndb/test/run-test/Makefile.am
      storage/ndb/test/src/Makefile.am
      storage/ndb/test/tools/Makefile.am
      storage/ndb/tools/Makefile.am
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_global.cc
      storage/perfschema/pfs_global.h
      strings/Makefile.am
      support-files/CMakeLists.txt
      support-files/MacOSX/Makefile.am
      support-files/Makefile.am
      support-files/RHEL4-SElinux/Makefile.am
      support-files/mysql.spec.sh
      tests/Makefile.am
      unittest/Makefile.am
      unittest/examples/Makefile.am
      unittest/mysys/CMakeLists.txt
      unittest/mysys/Makefile.am
      unittest/mytap/t/Makefile.am
      vio/Makefile.am
      win/Makefile.am
      zlib/Makefile.am
=== modified file 'mysql-test/suite/perfschema/r/myisam_table_io.result'
--- a/mysql-test/suite/perfschema/r/myisam_table_io.result	2010-05-07 12:14:13 +0000
+++ b/mysql-test/suite/perfschema/r/myisam_table_io.result	2010-05-25 08:19:01 +0000
@@ -60,51 +60,51 @@ event_name	short_source	object_type	obje
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	insert	NULL
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	insert	NULL
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	insert	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	update	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	update	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	update	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	delete	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TABLE	test	no_index_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	insert	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	insert	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	insert	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	update	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	update	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	update	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
 wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	delete	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
-wait/io/table/sql/handler	handler.h:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
+wait/io/table/sql/handler	handler.cc:	TEMPORARY TABLE	test	temp_tab	fetch	NULL
 show status like 'performance_schema_%';
 Variable_name	Value
 Performance_schema_cond_classes_lost	0

=== modified file 'sql/filesort.cc'
--- a/sql/filesort.cc	2010-05-05 08:16:47 +0000
+++ b/sql/filesort.cc	2010-05-25 08:19:01 +0000
@@ -585,11 +585,11 @@ static ha_rows find_all_keys(SORTPARAM *
 	  error= my_errno ? my_errno : -1;		/* Abort */
 	  break;
 	}
-	error=file->rnd_pos(sort_form->record[0],next_pos);
+	error= file->ha_rnd_pos(sort_form->record[0], next_pos);
       }
       else
       {
-	error=file->ha_rnd_next(sort_form->record[0]);
+	error= file->ha_rnd_next(sort_form->record[0]);
 	if (!flag)
 	{
 	  my_store_ptr(ref_pos,ref_length,record); // Position to row

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-05-05 08:16:47 +0000
+++ b/sql/ha_partition.cc	2010-05-25 08:19:01 +0000
@@ -3933,7 +3933,7 @@ int ha_partition::rnd_pos(uchar * buf, u
   DBUG_ASSERT(part_id < m_tot_parts);
   file= m_file[part_id];
   m_last_part= part_id;
-  DBUG_RETURN(file->rnd_pos(buf, (pos + PARTITION_BYTES_IN_POS)));
+  DBUG_RETURN(file->ha_rnd_pos(buf, (pos + PARTITION_BYTES_IN_POS)));
 }
 
 

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2010-05-05 08:16:47 +0000
+++ b/sql/handler.cc	2010-05-25 08:19:01 +0000
@@ -2125,7 +2125,17 @@ int handler::ha_open(TABLE *table_arg, c
   }
   else
   {
-    psi_open();
+    DBUG_ASSERT(m_psi == NULL);
+    DBUG_ASSERT(table_share != NULL);
+#ifdef HAVE_PSI_INTERFACE
+    if (likely(PSI_server != NULL))
+    {    
+      PSI_table_share *share_psi= ha_table_share_psi(table_share);
+      if (likely(share_psi != NULL))
+        m_psi= PSI_server->open_table(share_psi, this);
+    }    
+#endif
+
     if (table->s->db_options_in_use & HA_OPTION_READ_ONLY_DATA)
       table->db_stat|=HA_READ_ONLY;
     (void) extra(HA_EXTRA_NO_READCHECK);	// Not needed in SQL
@@ -2134,8 +2144,7 @@ int handler::ha_open(TABLE *table_arg, c
     if (!ref && !(ref= (uchar*) alloc_root(&table->mem_root, 
                                           ALIGN_SIZE(ref_length)*2)))
     {
-      psi_close();
-      close();
+      ha_close();
       error=HA_ERR_OUT_OF_MEM;
     }
     else
@@ -2145,6 +2154,133 @@ int handler::ha_open(TABLE *table_arg, c
   DBUG_RETURN(error);
 }
 
+int handler::ha_close(void)
+{
+#ifdef HAVE_PSI_INTERFACE
+  if (likely(PSI_server && m_psi))
+  {
+    PSI_server->close_table(m_psi);
+    m_psi= NULL; /* instrumentation handle, invalid after close_table() */
+  }
+#endif
+  DBUG_ASSERT(m_psi == NULL);
+  return close();
+}
+
+int handler::ha_rnd_next(uchar *buf)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, MAX_KEY, 0);
+  result= rnd_next(buf);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_rnd_pos(uchar *buf, uchar *pos)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, MAX_KEY, 0);
+  result= rnd_pos(buf, pos);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_read_map(uchar *buf, const uchar *key,
+                               key_part_map keypart_map,
+                               enum ha_rkey_function find_flag)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_read_map(buf, key, keypart_map, find_flag);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
+                                   key_part_map keypart_map,
+                                   enum ha_rkey_function find_flag)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, index, 0);
+  result= index_read_idx_map(buf, index, key, keypart_map, find_flag);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_next(uchar * buf)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_next(buf);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_prev(uchar * buf)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_prev(buf);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_first(uchar * buf)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_first(buf);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_last(uchar * buf)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_last(buf);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_next_same(buf, key, keylen);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_read(uchar *buf, const uchar *key, uint key_len,
+                           enum ha_rkey_function find_flag)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_read(buf, key, key_len, find_flag);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
+
+int handler::ha_index_read_last(uchar *buf, const uchar *key, uint key_len)
+{
+  int result;
+  struct PSI_table_locker *locker;
+  locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
+  result= index_read_last(buf, key, key_len);
+  MYSQL_END_TABLE_WAIT(locker);
+  return result;
+}
 
 /**
   Read first row (only) from a table.
@@ -2168,14 +2304,14 @@ int handler::read_first_row(uchar * buf,
       !(index_flags(primary_key, 0, 0) & HA_READ_ORDER))
   {
     (void) ha_rnd_init(1);
-    while ((error= rnd_next(buf)) == HA_ERR_RECORD_DELETED) ;
+    while ((error= ha_rnd_next(buf)) == HA_ERR_RECORD_DELETED) ;
     (void) ha_rnd_end();
   }
   else
   {
     /* Find the first row through the primary key */
     (void) ha_index_init(primary_key, 0);
-    error=index_first(buf);
+    error= ha_index_first(buf);
     (void) ha_index_end();
   }
   DBUG_RETURN(error);
@@ -2549,7 +2685,7 @@ void handler::get_auto_increment(ulonglo
   index_init(table->s->next_number_index, 1);
   if (table->s->next_number_keypart == 0)
   {						// Autoincrement at key-start
-    error=index_last(table->record[1]);
+    error= ha_index_last(table->record[1]);
     /*
       MySQL implicitely assumes such method does locking (as MySQL decides to
       use nr+increment without checking again with the handler, in
@@ -2563,9 +2699,9 @@ void handler::get_auto_increment(ulonglo
     key_copy(key, table->record[0],
              table->key_info + table->s->next_number_index,
              table->s->next_number_key_offset);
-    error= index_read_map(table->record[1], key,
-                          make_prev_keypart_map(table->s->next_number_keypart),
-                          HA_READ_PREFIX_LAST);
+    error= ha_index_read_map(table->record[1], key,
+                             make_prev_keypart_map(table->s->next_number_keypart),
+                             HA_READ_PREFIX_LAST);
     /*
       MySQL needs to call us for next row: assume we are inserting ("a",null)
       here, we return 3, and next this statement will want to insert
@@ -4227,12 +4363,12 @@ int handler::read_range_first(const key_
   range_key_part= table->key_info[active_index].key_part;
 
   if (!start_key)			// Read first record
-    result= index_first(table->record[0]);
+    result= ha_index_first(table->record[0]);
   else
-    result= index_read_map(table->record[0],
-                           start_key->key,
-                           start_key->keypart_map,
-                           start_key->flag);
+    result= ha_index_read_map(table->record[0],
+                              start_key->key,
+                              start_key->keypart_map,
+                              start_key->flag);
   if (result)
     DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND) 
 		? HA_ERR_END_OF_FILE
@@ -4263,11 +4399,11 @@ int handler::read_range_next()
   if (eq_range)
   {
     /* We trust that index_next_same always gives a row in range */
-    DBUG_RETURN(index_next_same(table->record[0],
-                                end_range->key,
-                                end_range->length));
+    DBUG_RETURN(ha_index_next_same(table->record[0],
+                                   end_range->key,
+                                   end_range->length));
   }
-  result= index_next(table->record[0]);
+  result= ha_index_next(table->record[0]);
   if (result)
     DBUG_RETURN(result);
   DBUG_RETURN(compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2010-05-05 08:16:47 +0000
+++ b/sql/handler.h	2010-05-25 08:19:01 +0000
@@ -32,7 +32,6 @@
 #include <my_handler.h>
 #include <ft_global.h>
 #include <keycache.h>
-#include <mysql/psi/mysql_table.h>
 
 #ifndef NO_HASH
 #define NO_HASH				/* Not yet implemented */
@@ -1266,11 +1265,7 @@ public:
   /* ha_ methods: public wrappers for private virtual API */
 
   int ha_open(TABLE *table, const char *name, int mode, int test_if_locked);
-  int ha_close(void)
-  {
-    psi_close();
-    return close();
-  }
+  int ha_close(void);
   int ha_index_init(uint idx, bool sorted)
   {
     int result;
@@ -1302,15 +1297,22 @@ public:
     inited=NONE;
     DBUG_RETURN(rnd_end());
   }
-  int ha_rnd_next(uchar *buf)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, MAX_KEY, 0);
-    result= rnd_next(buf);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
+  int ha_rnd_next(uchar *buf);
+  int ha_rnd_pos(uchar * buf, uchar *pos);
+  int ha_index_read_map(uchar *buf, const uchar *key,
+                        key_part_map keypart_map,
+                        enum ha_rkey_function find_flag);
+  int ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
+                           key_part_map keypart_map,
+                           enum ha_rkey_function find_flag);
+  int ha_index_next(uchar * buf);
+  int ha_index_prev(uchar * buf);
+  int ha_index_first(uchar * buf);
+  int ha_index_last(uchar * buf);
+  int ha_index_next_same(uchar *buf, const uchar *key, uint keylen);
+  int ha_index_read(uchar *buf, const uchar *key, uint key_len,
+                    enum ha_rkey_function find_flag);
+  int ha_index_read_last(uchar *buf, const uchar *key, uint key_len);
   int ha_reset();
   /* this is necessary in many places, e.g. in HANDLER command */
   int ha_index_or_rnd_end()
@@ -1492,73 +1494,6 @@ public:
     DBUG_ASSERT(FALSE);
     return HA_ERR_WRONG_COMMAND;
   }
-  int ha_index_read_map(uchar *buf, const uchar *key,
-                        key_part_map keypart_map,
-                        enum ha_rkey_function find_flag)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_read_map(buf, key, keypart_map, find_flag);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
-                           key_part_map keypart_map,
-                           enum ha_rkey_function find_flag)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, index, 0);
-    result= index_read_idx_map(buf, index, key, keypart_map, find_flag);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_next(uchar * buf)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_next(buf);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_prev(uchar * buf)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_prev(buf);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_first(uchar * buf)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_first(buf);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_last(uchar * buf)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_last(buf);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_next_same(buf, key, keylen);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
 protected:
   /**
      @brief
@@ -1619,8 +1554,8 @@ public:
   virtual int ft_read(uchar *buf) { return HA_ERR_WRONG_COMMAND; }
 protected:
   virtual int rnd_next(uchar *buf)=0;
-public:
   virtual int rnd_pos(uchar * buf, uchar *pos)=0;
+public:
   /**
     One has to use this method when to find
     random position by record as the plain
@@ -1630,7 +1565,7 @@ public:
   virtual int rnd_pos_by_record(uchar *record)
     {
       position(record);
-      return rnd_pos(record, ref);
+      return ha_rnd_pos(record, ref);
     }
   virtual int read_first_row(uchar *buf, uint primary_key);
   /**
@@ -1941,32 +1876,6 @@ protected:
   */
   PSI_table_share *ha_table_share_psi(const TABLE_SHARE *share) const;
 
-  inline void psi_open()
-  {
-    DBUG_ASSERT(m_psi == NULL);
-    DBUG_ASSERT(table_share != NULL);
-#ifdef HAVE_PSI_INTERFACE
-    if (likely(PSI_server != NULL))
-    {
-      PSI_table_share *share_psi= ha_table_share_psi(table_share);
-      if (likely(share_psi != NULL))
-        m_psi= PSI_server->open_table(share_psi, this);
-    }
-#endif
-  }
-
-  inline void psi_close()
-  {
-#ifdef HAVE_PSI_INTERFACE
-    if (likely(PSI_server && m_psi))
-    {
-      PSI_server->close_table(m_psi);
-      m_psi= NULL; /* instrumentation handle, invalid after close_table() */
-    }
-#endif
-    DBUG_ASSERT(m_psi == NULL);
-  }
-
   /**
     Default rename_table() and delete_table() rename/delete files with a
     given name and extensions from bas_ext().
@@ -2068,25 +1977,6 @@ private:
   { return HA_ADMIN_NOT_IMPLEMENTED; }
   virtual void start_bulk_insert(ha_rows rows) {}
   virtual int end_bulk_insert() { return 0; }
-  int ha_index_read(uchar *buf, const uchar *key, uint key_len,
-                    enum ha_rkey_function find_flag)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_read(buf, key, key_len, find_flag);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
-  int ha_index_read_last(uchar *buf, const uchar *key, uint key_len)
-  {
-    int result;
-    struct PSI_table_locker *locker;
-    locker= MYSQL_START_TABLE_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0);
-    result= index_read_last(buf, key, key_len);
-    MYSQL_END_TABLE_WAIT(locker);
-    return result;
-  }
 protected:
   virtual int index_read(uchar * buf, const uchar * key, uint key_len,
                          enum ha_rkey_function find_flag)

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-05-20 14:42:09 +0000
+++ b/sql/log_event.cc	2010-05-25 08:19:01 +0000
@@ -8739,19 +8739,19 @@ Rows_log_event::write_row(const Relay_lo
        We need to retrieve the old row into record[1] to be able to
        either update or delete the offending record.  We either:
 
-       - use rnd_pos() with a row-id (available as dupp_row) to the
+       - use ha_rnd_pos() with a row-id (available as dupp_row) to the
          offending row, if that is possible (MyISAM and Blackhole), or else
 
-       - use index_read_idx() with the key that is duplicated, to
+       - use ha_index_read_idx_map() with the key that is duplicated, to
          retrieve the offending row.
      */
     if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
     {
-      DBUG_PRINT("info",("Locating offending record using rnd_pos()"));
-      error= table->file->rnd_pos(table->record[1], table->file->dup_ref);
+      DBUG_PRINT("info",("Locating offending record using ha_rnd_pos()"));
+      error= table->file->ha_rnd_pos(table->record[1], table->file->dup_ref);
       if (error)
       {
-        DBUG_PRINT("info",("rnd_pos() returns error %d",error));
+        DBUG_PRINT("info",("ha_rnd_pos() returns error %d",error));
         if (error == HA_ERR_RECORD_DELETED)
           error= HA_ERR_KEY_NOT_FOUND;
         table->file->print_error(error, MYF(0));
@@ -8786,7 +8786,7 @@ Rows_log_event::write_row(const Relay_lo
                                                 HA_READ_KEY_EXACT);
       if (error)
       {
-        DBUG_PRINT("info",("index_read_idx() returns %s", HA_ERR(error)));
+        DBUG_PRINT("info",("ha_index_read_idx_map() returns %s", HA_ERR(error)));
         if (error == HA_ERR_RECORD_DELETED)
           error= HA_ERR_KEY_NOT_FOUND;
         table->file->print_error(error, MYF(0));

=== modified file 'sql/log_event_old.cc'
--- a/sql/log_event_old.cc	2010-05-05 08:16:47 +0000
+++ b/sql/log_event_old.cc	2010-05-25 08:19:01 +0000
@@ -517,18 +517,18 @@ replace_record(THD *thd, TABLE *table,
        We need to retrieve the old row into record[1] to be able to
        either update or delete the offending record.  We either:
 
-       - use rnd_pos() with a row-id (available as dupp_row) to the
+       - use ha_rnd_pos() with a row-id (available as dupp_row) to the
          offending row, if that is possible (MyISAM and Blackhole), or else
 
-       - use index_read_idx() with the key that is duplicated, to
+       - use ha_index_read_idx_map() with the key that is duplicated, to
          retrieve the offending row.
      */
     if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
     {
-      error= table->file->rnd_pos(table->record[1], table->file->dup_ref);
+      error= table->file->ha_rnd_pos(table->record[1], table->file->dup_ref);
       if (error)
       {
-        DBUG_PRINT("info",("rnd_pos() returns error %d",error));
+        DBUG_PRINT("info",("ha_rnd_pos() returns error %d",error));
         if (error == HA_ERR_RECORD_DELETED)
           error= HA_ERR_KEY_NOT_FOUND;
         table->file->print_error(error, MYF(0));
@@ -557,7 +557,7 @@ replace_record(THD *thd, TABLE *table,
                                                 HA_READ_KEY_EXACT);
       if (error)
       {
-        DBUG_PRINT("info", ("index_read_idx() returns error %d", error));
+        DBUG_PRINT("info", ("ha_index_read_idx_map() returns error %d", error));
         if (error == HA_ERR_RECORD_DELETED)
           error= HA_ERR_KEY_NOT_FOUND;
         table->file->print_error(error, MYF(0));
@@ -672,9 +672,9 @@ static int find_and_fetch_row(TABLE *tab
 
     */
     table->file->position(table->record[0]);
-    int error= table->file->rnd_pos(table->record[0], table->file->ref);
+    int error= table->file->ha_rnd_pos(table->record[0], table->file->ref);
     /*
-      rnd_pos() returns the record in table->record[0], so we have to
+      ha_rnd_pos() returns the record in table->record[0], so we have to
       move it to table->record[1].
      */
     bmove_align(table->record[1], table->record[0], table->s->reclength);
@@ -2022,19 +2022,19 @@ Old_rows_log_event::write_row(const Rela
        We need to retrieve the old row into record[1] to be able to
        either update or delete the offending record.  We either:
 
-       - use rnd_pos() with a row-id (available as dupp_row) to the
+       - use ha_rnd_pos() with a row-id (available as dupp_row) to the
          offending row, if that is possible (MyISAM and Blackhole), or else
 
-       - use index_read_idx() with the key that is duplicated, to
+       - use ha_index_read_idx_map() with the key that is duplicated, to
          retrieve the offending row.
      */
     if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
     {
-      DBUG_PRINT("info",("Locating offending record using rnd_pos()"));
-      error= table->file->rnd_pos(table->record[1], table->file->dup_ref);
+      DBUG_PRINT("info",("Locating offending record using ha_rnd_pos()"));
+      error= table->file->ha_rnd_pos(table->record[1], table->file->dup_ref);
       if (error)
       {
-        DBUG_PRINT("info",("rnd_pos() returns error %d",error));
+        DBUG_PRINT("info",("ha_rnd_pos() returns error %d",error));
         if (error == HA_ERR_RECORD_DELETED)
           error= HA_ERR_KEY_NOT_FOUND;
         table->file->print_error(error, MYF(0));
@@ -2069,7 +2069,7 @@ Old_rows_log_event::write_row(const Rela
                                                 HA_READ_KEY_EXACT);
       if (error)
       {
-        DBUG_PRINT("info",("index_read_idx() returns error %d", error));
+        DBUG_PRINT("info",("ha_index_read_idx_map() returns error %d", error));
         if (error == HA_ERR_RECORD_DELETED)
           error= HA_ERR_KEY_NOT_FOUND;
         table->file->print_error(error, MYF(0));

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2010-05-05 08:16:47 +0000
+++ b/sql/opt_range.cc	2010-05-25 08:19:01 +0000
@@ -8547,7 +8547,7 @@ int QUICK_ROR_INTERSECT_SELECT::get_next
 
     /* We get here if we got the same row ref in all scans. */
     if (need_to_fetch_row)
-      error= head->file->rnd_pos(head->record[0], last_rowid);
+      error= head->file->ha_rnd_pos(head->record[0], last_rowid);
   } while (error == HA_ERR_RECORD_DELETED);
   DBUG_RETURN(error);
 }
@@ -8613,7 +8613,7 @@ int QUICK_ROR_UNION_SELECT::get_next()
     cur_rowid= prev_rowid;
     prev_rowid= tmp;
 
-    error= head->file->rnd_pos(quick->record, prev_rowid);
+    error= head->file->ha_rnd_pos(quick->record, prev_rowid);
   } while (error == HA_ERR_RECORD_DELETED);
   DBUG_RETURN(error);
 }

=== modified file 'sql/records.cc'
--- a/sql/records.cc	2010-05-05 08:16:47 +0000
+++ b/sql/records.cc	2010-05-25 08:19:01 +0000
@@ -415,7 +415,7 @@ static int rr_from_tempfile(READ_RECORD 
   {
     if (my_b_read(info->io_cache,info->ref_pos,info->ref_length))
       return -1;					/* End of file */
-    if (!(tmp=info->file->rnd_pos(info->record,info->ref_pos)))
+    if (!(tmp=info->file->ha_rnd_pos(info->record,info->ref_pos)))
       break;
     /* The following is extremely unlikely to happen */
     if (tmp == HA_ERR_RECORD_DELETED ||
@@ -466,7 +466,7 @@ static int rr_from_pointers(READ_RECORD 
     cache_pos= info->cache_pos;
     info->cache_pos+= info->ref_length;
 
-    if (!(tmp=info->file->rnd_pos(info->record,cache_pos)))
+    if (!(tmp=info->file->ha_rnd_pos(info->record,cache_pos)))
       break;
 
     /* The following is extremely unlikely to happen */
@@ -599,7 +599,7 @@ static int rr_from_cache(READ_RECORD *in
       record=uint3korr(position);
       position+=3;
       record_pos=info->cache+record*info->reclength;
-      if ((error=(int16) info->file->rnd_pos(record_pos,info->ref_pos)))
+      if ((error=(int16) info->file->ha_rnd_pos(record_pos,info->ref_pos)))
       {
 	record_pos[info->error_offset]=1;
 	shortstore(record_pos,error);

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2010-05-20 14:42:09 +0000
+++ b/sql/sql_insert.cc	2010-05-25 08:19:01 +0000
@@ -1487,7 +1487,7 @@ int write_record(THD *thd, TABLE *table,
 	goto err;
       if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
       {
-	if (table->file->rnd_pos(table->record[1],table->file->dup_ref))
+	if (table->file->ha_rnd_pos(table->record[1],table->file->dup_ref))
 	  goto err;
       }
       else

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-05-05 08:16:47 +0000
+++ b/sql/sql_select.cc	2010-05-25 08:19:01 +0000
@@ -12775,7 +12775,7 @@ end_unique_update(JOIN *join, JOIN_TAB *
       table->file->print_error(error,MYF(0));	/* purecov: inspected */
       DBUG_RETURN(NESTED_LOOP_ERROR);            /* purecov: inspected */
     }
-    if (table->file->rnd_pos(table->record[1],table->file->dup_ref))
+    if (table->file->ha_rnd_pos(table->record[1], table->file->dup_ref))
     {
       table->file->print_error(error,MYF(0));	/* purecov: inspected */
       DBUG_RETURN(NESTED_LOOP_ERROR);            /* purecov: inspected */

=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc	2010-05-20 14:42:09 +0000
+++ b/sql/sql_update.cc	2010-05-25 08:19:01 +0000
@@ -160,7 +160,7 @@ static void prepare_record_for_error_mes
   /* Tell the engine about the new set. */
   table->file->column_bitmaps_signal();
   /* Read record that is identified by table->file->ref. */
-  (void) table->file->rnd_pos(table->record[1], table->file->ref);
+  (void) table->file->ha_rnd_pos(table->record[1], table->file->ref);
   /* Copy the newly read columns into the new record. */
   for (field_p= table->field; (field= *field_p); field_p++)
     if (bitmap_is_set(&unique_map, field->field_index))
@@ -1969,15 +1969,15 @@ int multi_update::do_updates()
 	goto err;
       }
 
-      /* call rnd_pos() using rowids from temporary table */
+      /* call ha_rnd_pos() using rowids from temporary table */
       check_opt_it.rewind();
       TABLE *tbl= table;
       uint field_num= 0;
       do
       {
         if((local_error=
-              tbl->file->rnd_pos(tbl->record[0],
-                                (uchar *) tmp_table->field[field_num]->ptr)))
+              tbl->file->ha_rnd_pos(tbl->record[0],
+                                    (uchar *) tmp_table->field[field_num]->ptr)))
           goto err;
         field_num++;
       } while((tbl= check_opt_it++));


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100525081901-6t54aa5kqj0lm9h0.bundle
Thread
bzr push into mysql-next-mr-wl4895 branch (marc.alff:3150 to 3151) WL#4895Marc Alff25 May