List:Commits« Previous MessageNext Message »
From:Marc Alff Date:November 17 2011 8:14pm
Subject:bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3442 to 3443)
View as plain text  
 3443 Marc Alff	2011-11-17
      Performance tuning, continued

    modified:
      include/mysql/psi/mysql_socket.h
      include/mysql/psi/mysql_thread.h
      storage/innobase/include/os0sync.ic
      storage/innobase/include/sync0rw.ic
      storage/innobase/include/sync0sync.ic
      storage/perfschema/pfs.cc
 3442 Marc Alff	2011-11-16 [merge]
      Merge mysql-trunk --> mysql-trunk-pfs-tuning

    removed:
      mysql-test/extra/rpl_tests/rpl_parallel_benchmark_load.test
      mysql-test/suite/rpl/t/rpl_parallel_benchmark-master.opt
      mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt
      mysql-test/suite/rpl/t/rpl_parallel_benchmark.test
    added:
      mysql-test/suite/innodb/r/innodb-restart.result
      mysql-test/suite/innodb/r/innodb_replace.result
      mysql-test/suite/innodb/t/innodb-restart.test
      mysql-test/suite/innodb/t/innodb_replace.test
      mysql-test/suite/rpl/r/rpl_master_connection.result
      mysql-test/suite/rpl/r/rpl_row_find_row_debug.result
      mysql-test/suite/rpl/t/rpl_master_connection-master.opt
      mysql-test/suite/rpl/t/rpl_master_connection-slave.opt
      mysql-test/suite/rpl/t/rpl_master_connection.test
      mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
      mysql-test/suite/sys_vars/r/metadata_locks_cache_size_basic.result
      mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic-master.opt
      mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic.test
      unittest/gunit/cost_estimate-t.cc
    modified:
      client/mysql_plugin.c
      client/mysql_upgrade.c
      client/mysqltest.cc
      configure.cmake
      mysql-test/collections/default.experimental
      mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
      mysql-test/extra/rpl_tests/rpl_parallel_load.test
      mysql-test/include/mrr_tests.inc
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/subquery_sj.inc
      mysql-test/include/subquery_sj_innodb.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/r/alter_table-big.result
      mysql-test/r/auth_rpl.result
      mysql-test/r/derived.result
      mysql-test/r/distinct.result
      mysql-test/r/events_2.result
      mysql-test/r/events_bugs.result
      mysql-test/r/func_analyse.result
      mysql-test/r/gis.result
      mysql-test/r/group_by.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_all.result
      mysql-test/r/innodb_mrr_cost.result
      mysql-test/r/innodb_mrr_cost_all.result
      mysql-test/r/innodb_mrr_cost_icp.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_mrr.result
      mysql-test/r/myisam_mrr_all.result
      mysql-test/r/myisam_mrr_cost.result
      mysql-test/r/myisam_mrr_cost_all.result
      mysql-test/r/myisam_mrr_cost_icp.result
      mysql-test/r/myisam_mrr_icp.result
      mysql-test/r/myisam_mrr_none.result
      mysql-test/r/mysql_upgrade.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqltest.result
      mysql-test/r/query_cache.result
      mysql-test/r/rpl_mysqldump_slave.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_innodb_all.result
      mysql-test/r/subquery_sj_innodb_all_bka.result
      mysql-test/r/subquery_sj_innodb_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_innodb_all_bkaunique.result
      mysql-test/r/subquery_sj_innodb_none.result
      mysql-test/r/subquery_sj_innodb_none_bka.result
      mysql-test/r/subquery_sj_innodb_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_innodb_none_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      mysql-test/r/variables.result
      mysql-test/r/view.result
      mysql-test/suite/binlog/r/binlog_rewrite.result
      mysql-test/suite/innodb/r/innodb-lock.result
      mysql-test/suite/innodb/t/innodb-lock.test
      mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
      mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/opt_trace/r/charset.result
      mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/opt_trace/r/general_no_prot_all.result
      mysql-test/suite/opt_trace/r/general_no_prot_none.result
      mysql-test/suite/opt_trace/r/general_ps_prot_all.result
      mysql-test/suite/opt_trace/r/general_ps_prot_none.result
      mysql-test/suite/opt_trace/r/range_no_prot.result
      mysql-test/suite/opt_trace/r/range_ps_prot.result
      mysql-test/suite/parts/r/rpl-partition-dml-1-1-innodb.result
      mysql-test/suite/parts/r/rpl-partition-dml-1-1-myisam.result
      mysql-test/suite/parts/r/rpl_partition.result
      mysql-test/suite/perfschema/r/relaylog.result
      mysql-test/suite/rpl/r/rpl_000010.result
      mysql-test/suite/rpl/r/rpl_000011.result
      mysql-test/suite/rpl/r/rpl_000013.result
      mysql-test/suite/rpl/r/rpl_000017.result
      mysql-test/suite/rpl/r/rpl_DML_error.result
      mysql-test/suite/rpl/r/rpl_EE_err.result
      mysql-test/suite/rpl/r/rpl_LD_INFILE.result
      mysql-test/suite/rpl/r/rpl_alter.result
      mysql-test/suite/rpl/r/rpl_alter_db.result
      mysql-test/suite/rpl/r/rpl_alter_repository.result
      mysql-test/suite/rpl/r/rpl_auto_increment.result
      mysql-test/suite/rpl/r/rpl_auto_increment_11932.result
      mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
      mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
      mysql-test/suite/rpl/r/rpl_binlog_corruption.result
      mysql-test/suite/rpl/r/rpl_binlog_errors.result
      mysql-test/suite/rpl/r/rpl_binlog_grant.result
      mysql-test/suite/rpl/r/rpl_bit.result
      mysql-test/suite/rpl/r/rpl_bit_npk.result
      mysql-test/suite/rpl/r/rpl_blackhole.result
      mysql-test/suite/rpl/r/rpl_bug26395.result
      mysql-test/suite/rpl/r/rpl_bug31076.result
      mysql-test/suite/rpl/r/rpl_bug33931.result
      mysql-test/suite/rpl/r/rpl_bug37426.result
      mysql-test/suite/rpl/r/rpl_bug38694.result
      mysql-test/suite/rpl/r/rpl_bug41902.result
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result
      mysql-test/suite/rpl/r/rpl_change_master_dbug.result
      mysql-test/suite/rpl/r/rpl_charset.result
      mysql-test/suite/rpl/r/rpl_charset_sjis.result
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_checksum_cache.result
      mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
      mysql-test/suite/rpl/r/rpl_colSize.result
      mysql-test/suite/rpl/r/rpl_commit_after_flush.result
      mysql-test/suite/rpl/r/rpl_concurrency_error.result
      mysql-test/suite/rpl/r/rpl_conditional_comments.result
      mysql-test/suite/rpl/r/rpl_corruption.result
      mysql-test/suite/rpl/r/rpl_crash_safe_master.result
      mysql-test/suite/rpl/r/rpl_create_database.result
      mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
      mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
      mysql-test/suite/rpl/r/rpl_cross_version.result
      mysql-test/suite/rpl/r/rpl_current_user.result
      mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
      mysql-test/suite/rpl/r/rpl_delete_no_where.result
      mysql-test/suite/rpl/r/rpl_do_db_filter.result
      mysql-test/suite/rpl/r/rpl_do_grant.result
      mysql-test/suite/rpl/r/rpl_do_table_filter_insensitive.result
      mysql-test/suite/rpl/r/rpl_do_table_filter_sensitive.result
      mysql-test/suite/rpl/r/rpl_drop.result
      mysql-test/suite/rpl/r/rpl_drop_db.result
      mysql-test/suite/rpl/r/rpl_drop_temp.result
      mysql-test/suite/rpl/r/rpl_drop_view.result
      mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
      mysql-test/suite/rpl/r/rpl_empty_master_host.result
      mysql-test/suite/rpl/r/rpl_err_ignoredtable.result
      mysql-test/suite/rpl/r/rpl_events.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
      mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
      mysql-test/suite/rpl/r/rpl_failed_optimize.result
      mysql-test/suite/rpl/r/rpl_filter_database.result
      mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
      mysql-test/suite/rpl/r/rpl_flush_logs.result
      mysql-test/suite/rpl/r/rpl_flushlog_loop.result
      mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result
      mysql-test/suite/rpl/r/rpl_free_items.result
      mysql-test/suite/rpl/r/rpl_general_log.result
      mysql-test/suite/rpl/r/rpl_geometry.result
      mysql-test/suite/rpl/r/rpl_get_lock.result
      mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
      mysql-test/suite/rpl/r/rpl_grant.result
      mysql-test/suite/rpl/r/rpl_grant_plugin.result
      mysql-test/suite/rpl/r/rpl_heartbeat.result
      mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result
      mysql-test/suite/rpl/r/rpl_idempotency.result
      mysql-test/suite/rpl/r/rpl_ignore_db_filter.result
      mysql-test/suite/rpl/r/rpl_ignore_grant.result
      mysql-test/suite/rpl/r/rpl_ignore_revoke.result
      mysql-test/suite/rpl/r/rpl_ignore_table.result
      mysql-test/suite/rpl/r/rpl_ignore_table_filter_insensitive.result
      mysql-test/suite/rpl/r/rpl_ignore_table_filter_sensitive.result
      mysql-test/suite/rpl/r/rpl_ignore_table_update.result
      mysql-test/suite/rpl/r/rpl_incident.result
      mysql-test/suite/rpl/r/rpl_init_slave.result
      mysql-test/suite/rpl/r/rpl_init_slave_errors.result
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
      mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
      mysql-test/suite/rpl/r/rpl_insert.result
      mysql-test/suite/rpl/r/rpl_insert_id.result
      mysql-test/suite/rpl/r/rpl_insert_id_pk.result
      mysql-test/suite/rpl/r/rpl_insert_ignore.result
      mysql-test/suite/rpl/r/rpl_invoked_features.result
      mysql-test/suite/rpl/r/rpl_ip_mix.result
      mysql-test/suite/rpl/r/rpl_ip_mix2.result
      mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result
      mysql-test/suite/rpl/r/rpl_ipv6.result
      mysql-test/suite/rpl/r/rpl_killed_ddl.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result
      mysql-test/suite/rpl/r/rpl_loaddata.result
      mysql-test/suite/rpl/r/rpl_loaddata_charset.result
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      mysql-test/suite/rpl/r/rpl_loaddata_m.result
      mysql-test/suite/rpl/r/rpl_loaddata_map.result
      mysql-test/suite/rpl/r/rpl_loaddata_s.result
      mysql-test/suite/rpl/r/rpl_loaddata_simple.result
      mysql-test/suite/rpl/r/rpl_loaddata_symlink.result
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result
      mysql-test/suite/rpl/r/rpl_loadfile.result
      mysql-test/suite/rpl/r/rpl_locale.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_many_optimize.result
      mysql-test/suite/rpl/r/rpl_master_pos_wait.result
      mysql-test/suite/rpl/r/rpl_migration_crash_safe.result
      mysql-test/suite/rpl/r/rpl_misc_functions.result
      mysql-test/suite/rpl/r/rpl_mix_found_rows.result
      mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result
      mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
      mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_mixed_mts_crash_safe.result
      mysql-test/suite/rpl/r/rpl_mixed_mts_rec_crash_safe.result
      mysql-test/suite/rpl/r/rpl_mixed_mts_rec_crash_safe_checksum.result
      mysql-test/suite/rpl/r/rpl_mts_check_concurrency.result
      mysql-test/suite/rpl/r/rpl_multi_delete.result
      mysql-test/suite/rpl/r/rpl_multi_delete2.result
      mysql-test/suite/rpl/r/rpl_multi_engine.result
      mysql-test/suite/rpl/r/rpl_multi_update.result
      mysql-test/suite/rpl/r/rpl_multi_update2.result
      mysql-test/suite/rpl/r/rpl_multi_update3.result
      mysql-test/suite/rpl/r/rpl_multi_update4.result
      mysql-test/suite/rpl/r/rpl_mysql_upgrade.result
      mysql-test/suite/rpl/r/rpl_name_const.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_nondeterministic_functions.result
      mysql-test/suite/rpl/r/rpl_not_null_innodb.result
      mysql-test/suite/rpl/r/rpl_not_null_myisam.result
      mysql-test/suite/rpl/r/rpl_optimize.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_parallel.result
      mysql-test/suite/rpl/r/rpl_parallel_benchmark.result
      mysql-test/suite/rpl/r/rpl_parallel_conf_limits.result
      mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
      mysql-test/suite/rpl/r/rpl_parallel_ddl.result
      mysql-test/suite/rpl/r/rpl_parallel_innodb.result
      mysql-test/suite/rpl/r/rpl_parallel_multi_db.result
      mysql-test/suite/rpl/r/rpl_parallel_seconds_behind_master.result
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/r/rpl_parallel_switch_sequential.result
      mysql-test/suite/rpl/r/rpl_parallel_temp_query.result
      mysql-test/suite/rpl/r/rpl_partition_archive.result
      mysql-test/suite/rpl/r/rpl_partition_innodb.result
      mysql-test/suite/rpl/r/rpl_partition_memory.result
      mysql-test/suite/rpl/r/rpl_partition_myisam.result
      mysql-test/suite/rpl/r/rpl_plugin_load.result
      mysql-test/suite/rpl/r/rpl_ps.result
      mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
      mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result
      mysql-test/suite/rpl/r/rpl_read_only.result
      mysql-test/suite/rpl/r/rpl_relay_space_innodb.result
      mysql-test/suite/rpl/r/rpl_relay_space_myisam.result
      mysql-test/suite/rpl/r/rpl_relayrotate.result
      mysql-test/suite/rpl/r/rpl_relayspace.result
      mysql-test/suite/rpl/r/rpl_replicate_do.result
      mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result
      mysql-test/suite/rpl/r/rpl_report.result
      mysql-test/suite/rpl/r/rpl_rewrite_db_filter.result
      mysql-test/suite/rpl/r/rpl_rewrt_db.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result
      mysql-test/suite/rpl/r/rpl_row_001.result
      mysql-test/suite/rpl/r/rpl_row_4_bytes.result
      mysql-test/suite/rpl/r/rpl_row_NOW.result
      mysql-test/suite/rpl/r/rpl_row_USER.result
      mysql-test/suite/rpl/r/rpl_row_UUID.result
      mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
      mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_basic_8partition.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_blob_innodb.result
      mysql-test/suite/rpl/r/rpl_row_blob_myisam.result
      mysql-test/suite/rpl/r/rpl_row_colSize.result
      mysql-test/suite/rpl/r/rpl_row_conflicts.result
      mysql-test/suite/rpl/r/rpl_row_corruption.result
      mysql-test/suite/rpl/r/rpl_row_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
      mysql-test/suite/rpl/r/rpl_row_drop.result
      mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_row_event_max_size.result
      mysql-test/suite/rpl/r/rpl_row_find_row.result
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
      mysql-test/suite/rpl/r/rpl_row_func001.result
      mysql-test/suite/rpl/r/rpl_row_func002.result
      mysql-test/suite/rpl/r/rpl_row_func003.result
      mysql-test/suite/rpl/r/rpl_row_idempotency.result
      mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
      mysql-test/suite/rpl/r/rpl_row_img_blobs.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_full.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_min.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_noblob.result
      mysql-test/suite/rpl/r/rpl_row_img_idx_full.result
      mysql-test/suite/rpl/r/rpl_row_img_idx_min.result
      mysql-test/suite/rpl/r/rpl_row_img_idx_noblob.result
      mysql-test/suite/rpl/r/rpl_row_img_misc.result
      mysql-test/suite/rpl/r/rpl_row_img_sanity.result
      mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
      mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
      mysql-test/suite/rpl/r/rpl_row_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.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_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_row_mts_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_mts_rec_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
      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/r/rpl_row_record_find_myisam.result
      mysql-test/suite/rpl/r/rpl_row_reset_slave.result
      mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result
      mysql-test/suite/rpl/r/rpl_row_sp001.result
      mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result
      mysql-test/suite/rpl/r/rpl_row_sp003.result
      mysql-test/suite/rpl/r/rpl_row_sp005.result
      mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
      mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result
      mysql-test/suite/rpl/r/rpl_row_sp008.result
      mysql-test/suite/rpl/r/rpl_row_sp009.result
      mysql-test/suite/rpl/r/rpl_row_sp010.result
      mysql-test/suite/rpl/r/rpl_row_sp011.result
      mysql-test/suite/rpl/r/rpl_row_sp012.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_tbl_metadata.result
      mysql-test/suite/rpl/r/rpl_row_trig001.result
      mysql-test/suite/rpl/r/rpl_row_trig002.result
      mysql-test/suite/rpl/r/rpl_row_trig003.result
      mysql-test/suite/rpl/r/rpl_row_trig004.result
      mysql-test/suite/rpl/r/rpl_row_trunc_temp.result
      mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result
      mysql-test/suite/rpl/r/rpl_row_utf16.result
      mysql-test/suite/rpl/r/rpl_row_utf32.result
      mysql-test/suite/rpl/r/rpl_row_view01.result
      mysql-test/suite/rpl/r/rpl_row_wide_table.result
      mysql-test/suite/rpl/r/rpl_savepoint.result
      mysql-test/suite/rpl/r/rpl_seconds_behind_master.result
      mysql-test/suite/rpl/r/rpl_semi_sync.result
      mysql-test/suite/rpl/r/rpl_semi_sync_event.result
      mysql-test/suite/rpl/r/rpl_sequential.result
      mysql-test/suite/rpl/r/rpl_server_id1.result
      mysql-test/suite/rpl/r/rpl_server_id2.result
      mysql-test/suite/rpl/r/rpl_server_id_ignore.result
      mysql-test/suite/rpl/r/rpl_server_uuid.result
      mysql-test/suite/rpl/r/rpl_session_var.result
      mysql-test/suite/rpl/r/rpl_set_charset.result
      mysql-test/suite/rpl/r/rpl_set_null_innodb.result
      mysql-test/suite/rpl/r/rpl_set_null_myisam.result
      mysql-test/suite/rpl/r/rpl_show_errors.result
      mysql-test/suite/rpl/r/rpl_show_master_info_file.result
      mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
      mysql-test/suite/rpl/r/rpl_show_slave_running.result
      mysql-test/suite/rpl/r/rpl_skip_error.result
      mysql-test/suite/rpl/r/rpl_skip_incident.result
      mysql-test/suite/rpl/r/rpl_slave_grp_exec.result
      mysql-test/suite/rpl/r/rpl_slave_load_in.result
      mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
      mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/r/rpl_slave_start.result
      mysql-test/suite/rpl/r/rpl_slave_status.result
      mysql-test/suite/rpl/r/rpl_slow_query_log.result
      mysql-test/suite/rpl/r/rpl_sp.result
      mysql-test/suite/rpl/r/rpl_sp004.result
      mysql-test/suite/rpl/r/rpl_sp_effects.result
      mysql-test/suite/rpl/r/rpl_spec_variables.result
      mysql-test/suite/rpl/r/rpl_sporadic_master.result
      mysql-test/suite/rpl/r/rpl_ssl.result
      mysql-test/suite/rpl/r/rpl_ssl1.result
      mysql-test/suite/rpl/r/rpl_stm_000001.result
      mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
      mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_stm_conflicts.result
      mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
      mysql-test/suite/rpl/r/rpl_stm_found_rows.result
      mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
      mysql-test/suite/rpl/r/rpl_stm_innodb.result
      mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_stm_lcase_tblnames.result
      mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
      mysql-test/suite/rpl/r/rpl_stm_loadfile.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_mix_show_relaylog_events.result
      mysql-test/suite/rpl/r/rpl_stm_mixed_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_stm_mts_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_mts_rec_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_multi_query.result
      mysql-test/suite/rpl/r/rpl_stm_no_op.result
      mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
      mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result
      mysql-test/suite/rpl/r/rpl_stm_user_variables.result
      mysql-test/suite/rpl/r/rpl_stop_slave.result
      mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
      mysql-test/suite/rpl/r/rpl_sync.result
      mysql-test/suite/rpl/r/rpl_temp_table.result
      mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
      mysql-test/suite/rpl/r/rpl_temporary.result
      mysql-test/suite/rpl/r/rpl_temporary_errors.result
      mysql-test/suite/rpl/r/rpl_test_framework.result
      mysql-test/suite/rpl/r/rpl_timezone.result
      mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
      mysql-test/suite/rpl/r/rpl_trigger.result
      mysql-test/suite/rpl/r/rpl_trunc_temp.result
      mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
      mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
      mysql-test/suite/rpl/r/rpl_typeconv.result
      mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
      mysql-test/suite/rpl/r/rpl_udf.result
      mysql-test/suite/rpl/r/rpl_user.result
      mysql-test/suite/rpl/r/rpl_user_variables.result
      mysql-test/suite/rpl/r/rpl_variables.result
      mysql-test/suite/rpl/r/rpl_variables_stm.result
      mysql-test/suite/rpl/r/rpl_view.result
      mysql-test/suite/rpl/r/rpl_view_multi.result
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
      mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
      mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
      mysql-test/suite/sys_vars/r/relay_log_basename_basic.result
      mysql-test/suite/sys_vars/r/relay_log_index_basic.result
      mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
      mysql-test/t/alter_table-big.test
      mysql-test/t/derived.test
      mysql-test/t/disabled.def
      mysql-test/t/distinct.test
      mysql-test/t/func_analyse.test
      mysql-test/t/gis.test
      mysql-test/t/group_by.test
      mysql-test/t/mysql_upgrade.test
      mysql-test/t/mysqltest.test
      mysql-test/t/query_cache.test
      mysql-test/t/rewrite_general_log.test
      mysql-test/t/variables.test
      mysql-test/t/view.test
      sql/binlog.cc
      sql/filesort.cc
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/item_func.cc
      sql/item_geofunc.cc
      sql/lex.h
      sql/log_event.cc
      sql/log_event.h
      sql/mdl.cc
      sql/mdl.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/opt_explain.cc
      sql/opt_range.cc
      sql/rpl_handler.cc
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/rpl_reporting.cc
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_rli_pdb.cc
      sql/rpl_slave.cc
      sql/share/errmsg-utf8.txt
      sql/sql_acl.cc
      sql/sql_class.h
      sql/sql_connect.cc
      sql/sql_const.h
      sql/sql_derived.cc
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_plist.h
      sql/sql_plugin.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_table.cc
      sql/sql_udf.cc
      sql/sql_union.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/table.cc
      sql/table.h
      storage/innobase/buf/buf0flu.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/handler/handler0alter.cc
      storage/innobase/include/dict0dict.ic
      storage/innobase/include/row0mysql.h
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0vers.c
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/perfschema/unittest/pfs_benchmark-t.cc
      unittest/gunit/CMakeLists.txt
=== modified file 'include/mysql/psi/mysql_socket.h'
--- a/include/mysql/psi/mysql_socket.h	2011-11-09 23:54:36 +0000
+++ b/include/mysql/psi/mysql_socket.h	2011-11-17 20:14:05 +0000
@@ -591,7 +591,9 @@ inline_mysql_socket_bind
 
     /* Instrumentation end */
     PSI_CALL(set_socket_info)(mysql_socket.m_psi, NULL, addr, len);
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -627,7 +629,8 @@ inline_mysql_socket_getsockname
     result= getsockname(mysql_socket.fd, addr, len);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -664,7 +667,8 @@ inline_mysql_socket_connect
     result= connect(mysql_socket.fd, addr, len);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -701,7 +705,8 @@ inline_mysql_socket_getpeername
     result= getpeername(mysql_socket.fd, addr, len);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -731,7 +736,6 @@ inline_mysql_socket_send
     /* Instrumentation start */
     PSI_socket_locker *locker;
     PSI_socket_locker_state state;
-    size_t bytes_written;
     locker= PSI_CALL(start_socket_wait)(&state, mysql_socket.m_psi,
                                         PSI_SOCKET_SEND, n, src_file, src_line);
 
@@ -739,8 +743,12 @@ inline_mysql_socket_send
     result= send(mysql_socket.fd, buf, n, flags);
 
     /* Instrumentation end */
-    bytes_written= (result > -1) ? result : 0;
-    PSI_CALL(end_socket_wait)(locker, bytes_written);
+    if (locker != NULL)
+    {
+      size_t bytes_written;
+      bytes_written= (result > -1) ? result : 0;
+      PSI_CALL(end_socket_wait)(locker, bytes_written);
+    }
 
     return result;
   }
@@ -770,7 +778,6 @@ inline_mysql_socket_recv
     /* Instrumentation start */
     PSI_socket_locker *locker;
     PSI_socket_locker_state state;
-    size_t bytes_read;
     locker= PSI_CALL(start_socket_wait)(&state, mysql_socket.m_psi,
                                         PSI_SOCKET_RECV, (size_t)0, src_file, src_line);
 
@@ -778,8 +785,12 @@ inline_mysql_socket_recv
     result= recv(mysql_socket.fd, buf, n, flags);
 
     /* Instrumentation end */
-    bytes_read= (result > -1) ? result : 0;
-    PSI_CALL(end_socket_wait)(locker, bytes_read);
+    if (locker != NULL)
+    {
+      size_t bytes_read;
+      bytes_read= (result > -1) ? result : 0;
+      PSI_CALL(end_socket_wait)(locker, bytes_read);
+    }
 
     return result;
   }
@@ -809,7 +820,6 @@ inline_mysql_socket_sendto
     /* Instrumentation start */
     PSI_socket_locker *locker;
     PSI_socket_locker_state state;
-    size_t bytes_written;
     locker= PSI_CALL(start_socket_wait)(&state, mysql_socket.m_psi,
                                         PSI_SOCKET_SEND, n, src_file, src_line);
 
@@ -817,8 +827,12 @@ inline_mysql_socket_sendto
     result= sendto(mysql_socket.fd, buf, n, flags, addr, addr_len);
 
     /* Instrumentation end */
-    bytes_written = (result > -1) ? result : 0;
-    PSI_CALL(end_socket_wait)(locker, bytes_written);
+    if (locker != NULL)
+    {
+      size_t bytes_written;
+      bytes_written = (result > -1) ? result : 0;
+      PSI_CALL(end_socket_wait)(locker, bytes_written);
+    }
 
     return result;
   }
@@ -849,7 +863,6 @@ inline_mysql_socket_recvfrom
     /* Instrumentation start */
     PSI_socket_locker *locker;
     PSI_socket_locker_state state;
-    size_t bytes_read;
     locker= PSI_CALL(start_socket_wait)(&state, mysql_socket.m_psi,
                                         PSI_SOCKET_RECV, (size_t)0, src_file, src_line);
 
@@ -857,8 +870,12 @@ inline_mysql_socket_recvfrom
     result= recvfrom(mysql_socket.fd, buf, n, flags, addr, addr_len);
 
     /* Instrumentation end */
-    bytes_read = (result > -1) ? result : 0;
-    PSI_CALL(end_socket_wait)(locker, bytes_read);
+    if (locker != NULL)
+    {
+      size_t bytes_read;
+      bytes_read = (result > -1) ? result : 0;
+      PSI_CALL(end_socket_wait)(locker, bytes_read);
+    }
 
     return result;
   }
@@ -895,7 +912,8 @@ inline_mysql_socket_getsockopt
     result= getsockopt(mysql_socket.fd, level, optname, optval, optlen);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -933,7 +951,8 @@ inline_mysql_socket_setsockopt
     result= setsockopt(mysql_socket.fd, level, optname, optval, optlen);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -970,7 +989,8 @@ inline_mysql_socket_listen
     result= listen(mysql_socket.fd, backlog);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }
@@ -1008,7 +1028,8 @@ inline_mysql_socket_accept
     socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
   }
   else
 #endif
@@ -1056,9 +1077,11 @@ inline_mysql_socket_close
     result= closesocket(mysql_socket.fd);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
     /* Remove the instrumentation for this socket. */
-    PSI_CALL(destroy_socket)(mysql_socket.m_psi);
+    if (mysql_socket.m_psi != NULL)
+      PSI_CALL(destroy_socket)(mysql_socket.m_psi);
 
     return result;
   }
@@ -1095,7 +1118,8 @@ inline_mysql_socket_shutdown
     result= shutdown(mysql_socket.fd, how);
 
     /* Instrumentation end */
-    PSI_CALL(end_socket_wait)(locker, (size_t)0);
+    if (locker != NULL)
+      PSI_CALL(end_socket_wait)(locker, (size_t)0);
 
     return result;
   }

=== modified file 'include/mysql/psi/mysql_thread.h'
--- a/include/mysql/psi/mysql_thread.h	2011-11-04 16:34:00 +0000
+++ b/include/mysql/psi/mysql_thread.h	2011-11-17 20:14:05 +0000
@@ -631,8 +631,11 @@ static inline int inline_mysql_mutex_des
   )
 {
 #ifdef HAVE_PSI_MUTEX_INTERFACE
-  PSI_CALL(destroy_mutex)(that->m_psi);
-  that->m_psi= NULL;
+  if (that->m_psi != NULL)
+  {
+    PSI_CALL(destroy_mutex)(that->m_psi);
+    that->m_psi= NULL;
+  }
 #endif
 #ifdef SAFE_MUTEX
   return safe_mutex_destroy(&that->m_mutex, src_file, src_line);
@@ -747,7 +750,8 @@ static inline int inline_mysql_mutex_unl
   int result;
 
 #ifdef HAVE_PSI_MUTEX_INTERFACE
-  PSI_CALL(unlock_mutex)(that->m_psi);
+  if (that->m_psi != NULL)
+    PSI_CALL(unlock_mutex)(that->m_psi);
 #endif
 
 #ifdef SAFE_MUTEX
@@ -815,8 +819,11 @@ static inline int inline_mysql_rwlock_de
   mysql_rwlock_t *that)
 {
 #ifdef HAVE_PSI_RWLOCK_INTERFACE
-  PSI_CALL(destroy_rwlock)(that->m_psi);
-  that->m_psi= NULL;
+  if (that->m_psi != NULL)
+  {
+    PSI_CALL(destroy_rwlock)(that->m_psi);
+    that->m_psi= NULL;
+  }
 #endif
   return rwlock_destroy(&that->m_rwlock);
 }
@@ -826,8 +833,11 @@ static inline int inline_mysql_prlock_de
   mysql_prlock_t *that)
 {
 #ifdef HAVE_PSI_RWLOCK_INTERFACE
-  PSI_CALL(destroy_rwlock)(that->m_psi);
-  that->m_psi= NULL;
+  if (that->m_psi != NULL)
+  {
+    PSI_CALL(destroy_rwlock)(that->m_psi);
+    that->m_psi= NULL;
+  }
 #endif
   return rw_pr_destroy(&that->m_prlock);
 }
@@ -1052,7 +1062,8 @@ static inline int inline_mysql_rwlock_un
 {
   int result;
 #ifdef HAVE_PSI_RWLOCK_INTERFACE
-  PSI_CALL(unlock_rwlock)(that->m_psi);
+  if (that->m_psi != NULL)
+    PSI_CALL(unlock_rwlock)(that->m_psi);
 #endif
   result= rw_unlock(&that->m_rwlock);
   return result;
@@ -1064,7 +1075,8 @@ static inline int inline_mysql_prlock_un
 {
   int result;
 #ifdef HAVE_PSI_RWLOCK_INTERFACE
-  PSI_CALL(unlock_rwlock)(that->m_psi);
+  if (that->m_psi != NULL)
+    PSI_CALL(unlock_rwlock)(that->m_psi);
 #endif
   result= rw_pr_unlock(&that->m_prlock);
   return result;
@@ -1107,8 +1119,11 @@ static inline int inline_mysql_cond_dest
   mysql_cond_t *that)
 {
 #ifdef HAVE_PSI_COND_INTERFACE
-  PSI_CALL(destroy_cond)(that->m_psi);
-  that->m_psi= NULL;
+  if (that->m_psi != NULL)
+  {
+    PSI_CALL(destroy_cond)(that->m_psi);
+    that->m_psi= NULL;
+  }
 #endif
   return pthread_cond_destroy(&that->m_cond);
 }
@@ -1191,7 +1206,8 @@ static inline int inline_mysql_cond_sign
 {
   int result;
 #ifdef HAVE_PSI_COND_INTERFACE
-  PSI_CALL(signal_cond)(that->m_psi);
+  if (that->m_psi != NULL)
+    PSI_CALL(signal_cond)(that->m_psi);
 #endif
   result= pthread_cond_signal(&that->m_cond);
   return result;
@@ -1202,7 +1218,8 @@ static inline int inline_mysql_cond_broa
 {
   int result;
 #ifdef HAVE_PSI_COND_INTERFACE
-  PSI_CALL(broadcast_cond)(that->m_psi);
+  if (that->m_psi != NULL)
+    PSI_CALL(broadcast_cond)(that->m_psi);
 #endif
   result= pthread_cond_broadcast(&that->m_cond);
   return result;

=== modified file 'storage/innobase/include/os0sync.ic'
--- a/storage/innobase/include/os0sync.ic	2011-11-04 23:30:07 +0000
+++ b/storage/innobase/include/os0sync.ic	2011-11-17 20:14:05 +0000
@@ -85,7 +85,8 @@ pfs_os_fast_mutex_free(
 	os_fast_mutex_t*	fast_mutex)  /*!< in/out: mutex */
 {
 #ifdef HAVE_PSI_MUTEX_INTERFACE
-	PSI_CALL(destroy_mutex)(fast_mutex->pfs_psi);
+	if (fast_mutex->pfs_psi != NULL)
+		PSI_CALL(destroy_mutex)(fast_mutex->pfs_psi);
 #endif
 	fast_mutex->pfs_psi = NULL;
 
@@ -139,7 +140,8 @@ pfs_os_fast_mutex_unlock(
 	os_fast_mutex_t*	fast_mutex)	/*!< in/out: mutex to release */
 {
 #ifdef HAVE_PSI_MUTEX_INTERFACE
-	PSI_CALL(unlock_mutex)(fast_mutex->pfs_psi);
+	if (fast_mutex->pfs_psi != NULL)
+		PSI_CALL(unlock_mutex)(fast_mutex->pfs_psi);
 #endif
 
 	os_fast_mutex_unlock_func(&fast_mutex->mutex);

=== modified file 'storage/innobase/include/sync0rw.ic'
--- a/storage/innobase/include/sync0rw.ic	2011-11-04 23:30:07 +0000
+++ b/storage/innobase/include/sync0rw.ic	2011-11-17 20:14:05 +0000
@@ -745,8 +745,11 @@ pfs_rw_lock_free_func(
 /*==================*/
 	rw_lock_t*	lock)	/*!< in: pointer to rw-lock */
 {
-	PSI_CALL(destroy_rwlock)(lock->pfs_psi);
-	lock->pfs_psi = NULL;
+	if (lock->pfs_psi != NULL)
+	{
+		PSI_CALL(destroy_rwlock)(lock->pfs_psi);
+		lock->pfs_psi = NULL;
+	}
 
 	rw_lock_free_func(lock);
 }
@@ -842,7 +845,8 @@ pfs_rw_lock_x_unlock_func(
 	rw_lock_t*	lock)	/*!< in/out: rw-lock */
 {
 	/* Inform performance schema we are unlocking the lock */
-	PSI_CALL(unlock_rwlock)(lock->pfs_psi);
+	if (lock->pfs_psi != NULL)
+		PSI_CALL(unlock_rwlock)(lock->pfs_psi);
 
 	rw_lock_x_unlock_func(
 #ifdef UNIV_SYNC_DEBUG
@@ -867,7 +871,8 @@ pfs_rw_lock_s_unlock_func(
 	rw_lock_t*	lock)	/*!< in/out: rw-lock */
 {
 	/* Inform performance schema we are unlocking the lock */
-	PSI_CALL(unlock_rwlock)(lock->pfs_psi);
+	if (lock->pfs_psi != NULL)
+		PSI_CALL(unlock_rwlock)(lock->pfs_psi);
 
 	rw_lock_s_unlock_func(
 #ifdef UNIV_SYNC_DEBUG

=== modified file 'storage/innobase/include/sync0sync.ic'
--- a/storage/innobase/include/sync0sync.ic	2011-11-04 23:30:07 +0000
+++ b/storage/innobase/include/sync0sync.ic	2011-11-17 20:14:05 +0000
@@ -300,7 +300,8 @@ pfs_mutex_exit_func(
 /*================*/
 	mutex_t*	mutex)	/*!< in: pointer to mutex */
 {
-	PSI_CALL(unlock_mutex)(mutex->pfs_psi);
+	if (mutex->pfs_psi != NULL)
+		PSI_CALL(unlock_mutex)(mutex->pfs_psi);
 
 	mutex_exit_func(mutex);
 }
@@ -349,8 +350,11 @@ pfs_mutex_free_func(
 /*================*/
 	mutex_t*	mutex)	/*!< in: mutex */
 {
-	PSI_CALL(destroy_mutex)(mutex->pfs_psi);
-	mutex->pfs_psi = NULL;
+	if (mutex->pfs_psi != NULL)
+	{
+		PSI_CALL(destroy_mutex)(mutex->pfs_psi);
+		mutex->pfs_psi = NULL;
+	}
 
 	mutex_free_func(mutex);
 }

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2011-11-10 02:03:57 +0000
+++ b/storage/perfschema/pfs.cc	2011-11-17 20:14:05 +0000
@@ -1421,8 +1421,7 @@ static void destroy_mutex_v1(PSI_mutex*
 {
   PFS_mutex *pfs= reinterpret_cast<PFS_mutex*> (mutex);
 
-  if (unlikely(pfs == NULL))
-    return;
+  DBUG_ASSERT(pfs != NULL);
 
   destroy_mutex(pfs);
 }
@@ -1445,8 +1444,7 @@ static void destroy_rwlock_v1(PSI_rwlock
 {
   PFS_rwlock *pfs= reinterpret_cast<PFS_rwlock*> (rwlock);
 
-  if (unlikely(pfs == NULL))
-    return;
+  DBUG_ASSERT(pfs != NULL);
 
   destroy_rwlock(pfs);
 }
@@ -1469,8 +1467,7 @@ static void destroy_cond_v1(PSI_cond* co
 {
   PFS_cond *pfs= reinterpret_cast<PFS_cond*> (cond);
 
-  if (unlikely(pfs == NULL))
-    return;
+  DBUG_ASSERT(pfs != NULL);
 
   destroy_cond(pfs);
 }
@@ -1662,8 +1659,7 @@ static void destroy_socket_v1(PSI_socket
 {
   PFS_socket *pfs= reinterpret_cast<PFS_socket*> (socket);
 
-  if (unlikely(pfs == NULL))
-    return;
+  DBUG_ASSERT(pfs != NULL);
 
   destroy_socket(pfs);
 }
@@ -2946,9 +2942,7 @@ start_socket_wait_v1(PSI_socket_locker_s
   DBUG_ASSERT(state != NULL);
   PFS_socket *pfs_socket= reinterpret_cast<PFS_socket*> (socket);
 
-  if (unlikely(pfs_socket == NULL))
-    return NULL;
-
+  DBUG_ASSERT(pfs_socket != NULL);
   DBUG_ASSERT(pfs_socket->m_class != NULL);
 
   if (!pfs_socket->m_enabled || pfs_socket->m_idle)
@@ -2978,7 +2972,7 @@ start_socket_wait_v1(PSI_socket_locker_s
     state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
     flags= STATE_FLAG_THREAD;
 
-    if (pfs_socket->m_timed && !pfs_socket->m_idle)
+    if (pfs_socket->m_timed)
     {
       timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
       state->m_timer_start= timer_start;
@@ -3068,8 +3062,7 @@ static void unlock_mutex_v1(PSI_mutex *m
 {
   PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
 
-  if (unlikely(pfs_mutex == NULL))
-    return;
+  DBUG_ASSERT(pfs_mutex != NULL);
 
   /*
     Note that this code is still protected by the instrumented mutex,
@@ -3113,8 +3106,7 @@ static void unlock_rwlock_v1(PSI_rwlock
 {
   PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock);
 
-  if (unlikely(pfs_rwlock == NULL))
-    return;
+  DBUG_ASSERT(pfs_rwlock != NULL);
 
   DBUG_ASSERT(pfs_rwlock != NULL);
   bool last_writer= false;
@@ -3200,8 +3192,7 @@ static void signal_cond_v1(PSI_cond* con
 {
   PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
 
-  if (unlikely(pfs_cond == NULL))
-    return;
+  DBUG_ASSERT(pfs_cond != NULL);
 
   pfs_cond->m_cond_stat.m_signal_count++;
 }
@@ -3214,8 +3205,7 @@ static void broadcast_cond_v1(PSI_cond*
 {
   PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
 
-  if (unlikely(pfs_cond == NULL))
-    return;
+  DBUG_ASSERT(pfs_cond != NULL);
 
   pfs_cond->m_cond_stat.m_broadcast_count++;
 }
@@ -3512,8 +3502,7 @@ static void end_rwlock_rdwait_v1(PSI_rwl
 static void end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc)
 {
   PSI_rwlock_locker_state *state= reinterpret_cast<PSI_rwlock_locker_state*> (locker);
-  if (state == NULL)
-    return;
+  DBUG_ASSERT(state != NULL);
 
   ulonglong timer_end= 0;
   ulonglong wait_time= 0;
@@ -4618,8 +4607,7 @@ static void end_statement_v1(PSI_stateme
 static void end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count)
 {
   PSI_socket_locker_state *state= reinterpret_cast<PSI_socket_locker_state*> (locker);
-  if (state == NULL)
-    return;
+  DBUG_ASSERT(state != NULL);
 
   PFS_socket *socket= reinterpret_cast<PFS_socket *>(state->m_socket);
   DBUG_ASSERT(socket != NULL);
@@ -4700,9 +4688,8 @@ static void end_socket_wait_v1(PSI_socke
 static void set_socket_state_v1(PSI_socket *socket, PSI_socket_state state)
 {
   DBUG_ASSERT((state == PSI_SOCKET_STATE_IDLE) || (state == PSI_SOCKET_STATE_ACTIVE));
-  if (unlikely(socket == NULL))
-    return;
   PFS_socket *pfs= reinterpret_cast<PFS_socket*>(socket);
+  DBUG_ASSERT(pfs != NULL);
   DBUG_ASSERT(pfs->m_idle || (state == PSI_SOCKET_STATE_IDLE));
   DBUG_ASSERT(!pfs->m_idle || (state == PSI_SOCKET_STATE_ACTIVE));
   pfs->m_idle= (state == PSI_SOCKET_STATE_IDLE);
@@ -4716,10 +4703,8 @@ static void set_socket_info_v1(PSI_socke
                                const struct sockaddr *addr,
                                socklen_t addr_len)
 {
-  if (unlikely(socket == NULL))
-    return;
-
   PFS_socket *pfs= reinterpret_cast<PFS_socket*>(socket);
+  DBUG_ASSERT(pfs != NULL);
 
   /** Set socket descriptor */
   if (fd != NULL)
@@ -4744,9 +4729,8 @@ static void set_socket_info_v1(PSI_socke
 */
 static void set_socket_thread_owner_v1(PSI_socket *socket)
 {
-  if (unlikely(socket == NULL))
-    return;
   PFS_socket *pfs_socket= reinterpret_cast<PFS_socket*>(socket);
+  DBUG_ASSERT(pfs_socket != NULL);
   pfs_socket->m_thread_owner= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3442 to 3443) Marc Alff18 Nov