summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-10-25 12:53:40 +0200
committerunknown <knielsen@knielsen-hq.org>2011-10-25 12:53:40 +0200
commit5da52cd108468580f036b479be77ef80c64d1181 (patch)
tree5aba76b06329ff2c6ef9d6f277ad57c027728ddc
parent90b43902b0e67bcd4c6a5f08d7d76c93df74d4c8 (diff)
downloadmariadb-git-5da52cd108468580f036b479be77ef80c64d1181.tar.gz
Some after-merge fixes for 5.5 merge.
-rw-r--r--mysql-test/include/have_mutex_deadlock_detector.inc4
-rw-r--r--mysql-test/r/have_mutex_deadlock_detector.require2
-rw-r--r--mysql-test/suite/perfschema/r/all_instances.result2
-rw-r--r--mysql-test/suite/perfschema/r/relaylog.result4
-rw-r--r--mysql-test/suite/perfschema/t/all_instances.test1
-rw-r--r--mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test2
-rw-r--r--sql/log.cc5
-rw-r--r--sql/log.h4
-rw-r--r--sql/mysqld.cc13
-rw-r--r--sql/mysqld.h5
-rw-r--r--sql/rpl_rli.cc3
11 files changed, 36 insertions, 9 deletions
diff --git a/mysql-test/include/have_mutex_deadlock_detector.inc b/mysql-test/include/have_mutex_deadlock_detector.inc
new file mode 100644
index 00000000000..3672f3eccef
--- /dev/null
+++ b/mysql-test/include/have_mutex_deadlock_detector.inc
@@ -0,0 +1,4 @@
+--require r/have_mutex_deadlock_detector.require
+disable_query_log;
+select 1 from information_schema.global_variables where variable_name = "mutex_deadlock_detector";
+enable_query_log;
diff --git a/mysql-test/r/have_mutex_deadlock_detector.require b/mysql-test/r/have_mutex_deadlock_detector.require
new file mode 100644
index 00000000000..6ed281c757a
--- /dev/null
+++ b/mysql-test/r/have_mutex_deadlock_detector.require
@@ -0,0 +1,2 @@
+1
+1
diff --git a/mysql-test/suite/perfschema/r/all_instances.result b/mysql-test/suite/perfschema/r/all_instances.result
index 59b7232dc15..93386be7fa9 100644
--- a/mysql-test/suite/perfschema/r/all_instances.result
+++ b/mysql-test/suite/perfschema/r/all_instances.result
@@ -123,7 +123,9 @@ wait/synch/cond/sql/Master_info::data_cond
wait/synch/cond/sql/Master_info::start_cond
wait/synch/cond/sql/Master_info::stop_cond
wait/synch/cond/sql/MDL_context::COND_wait_status
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_queue_busy
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond
+wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
wait/synch/cond/sql/Query_cache::COND_cache_status_changed
wait/synch/cond/sql/Relay_log_info::data_cond
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result
index e2f8270b1f0..fa5c386acbc 100644
--- a/mysql-test/suite/perfschema/r/relaylog.result
+++ b/mysql-test/suite/perfschema/r/relaylog.result
@@ -55,6 +55,7 @@ from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_queue_busy NONE
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
@@ -70,6 +71,7 @@ wait/io/file/sql/relaylog_index 0 0 0 0
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy 0 0 0 0 0
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond 0 0 0 0 0
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
"============ Performance schema on slave ============"
@@ -126,6 +128,7 @@ from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_queue_busy NONE
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond NONE
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
@@ -164,6 +167,7 @@ if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
EVENT_NAME COUNT_STAR
+wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy NONE
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index MANY
include/stop_slave.inc
diff --git a/mysql-test/suite/perfschema/t/all_instances.test b/mysql-test/suite/perfschema/t/all_instances.test
index eb011b2d5c7..801056d9d1c 100644
--- a/mysql-test/suite/perfschema/t/all_instances.test
+++ b/mysql-test/suite/perfschema/t/all_instances.test
@@ -3,6 +3,7 @@
--source include/have_maria.inc
--source include/have_archive.inc
--source include/have_blackhole.inc
+--source include/have_ssl.inc
use performance_schema;
diff --git a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test b/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
index 03b7743a7aa..398636fcb13 100644
--- a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
+++ b/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
@@ -1,3 +1,5 @@
+--source include/have_mutex_deadlock_detector.inc
+
# bool readonly
#
diff --git a/sql/log.cc b/sql/log.cc
index d7d7bf0f7b7..8939e69bb54 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -5946,7 +5946,8 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
{
if (!current->error &&
RUN_HOOK(binlog_storage, after_flush,
- (current->thd, log_file_name, log_file.pos_in_file, synced)))
+ (current->thd, log_file_name,
+ current->cache_mngr->last_commit_pos_offset, synced)))
{
current->error= ER_ERROR_ON_WRITE;
current->commit_errno= -1;
@@ -6828,7 +6829,7 @@ int TC_LOG_MMAP::open(const char *opt_name)
mysql_mutex_init(key_LOCK_pool, &LOCK_pool, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_active, &COND_active, 0);
mysql_cond_init(key_COND_pool, &COND_pool, 0);
- mysql_cond_init(key_COND_queue_busy, &COND_queue_busy, 0);
+ mysql_cond_init(key_TC_LOG_MMAP_COND_queue_busy, &COND_queue_busy, 0);
inited=6;
diff --git a/sql/log.h b/sql/log.h
index 3ec7ee96a12..bad86e7615d 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -539,12 +539,14 @@ public:
void set_psi_keys(PSI_mutex_key key_LOCK_index,
PSI_cond_key key_update_cond,
PSI_file_key key_file_log,
- PSI_file_key key_file_log_index)
+ PSI_file_key key_file_log_index,
+ PSI_file_key key_COND_queue_busy)
{
m_key_LOCK_index= key_LOCK_index;
m_key_update_cond= key_update_cond;
m_key_file_log= key_file_log;
m_key_file_log_index= key_file_log_index;
+ m_key_COND_queue_busy= key_COND_queue_busy;
}
#endif
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6d90c2e88b8..5846bc2238a 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -811,7 +811,7 @@ static PSI_rwlock_info all_server_rwlocks[]=
};
#ifdef HAVE_MMAP
-PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool, key_COND_queue_busy;
+PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
#endif /* HAVE_MMAP */
PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
@@ -823,8 +823,11 @@ PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
key_relay_log_info_data_cond, key_relay_log_info_log_space_cond,
key_relay_log_info_start_cond, key_relay_log_info_stop_cond,
key_TABLE_SHARE_cond, key_user_level_lock_cond,
- key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache;
+ key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache,
+ key_BINLOG_COND_queue_busy;
PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready;
+PSI_cond_key key_RELAYLOG_COND_queue_busy;
+PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
static PSI_cond_info all_server_conds[]=
{
@@ -835,10 +838,13 @@ static PSI_cond_info all_server_conds[]=
{ &key_PAGE_cond, "PAGE::cond", 0},
{ &key_COND_active, "TC_LOG_MMAP::COND_active", 0},
{ &key_COND_pool, "TC_LOG_MMAP::COND_pool", 0},
+ { &key_TC_LOG_MMAP_COND_queue_busy, "TC_LOG_MMAP::COND_queue_busy", 0},
#endif /* HAVE_MMAP */
{ &key_BINLOG_COND_prep_xids, "MYSQL_BIN_LOG::COND_prep_xids", 0},
{ &key_BINLOG_update_cond, "MYSQL_BIN_LOG::update_cond", 0},
+ { &key_BINLOG_COND_queue_busy, "MYSQL_BIN_LOG::COND_queue_busy", 0},
{ &key_RELAYLOG_update_cond, "MYSQL_RELAY_LOG::update_cond", 0},
+ { &key_RELAYLOG_COND_queue_busy, "MYSQL_RELAY_LOG::COND_queue_busy", 0},
{ &key_COND_wakeup_ready, "THD::COND_wakeup_ready", 0},
{ &key_COND_cache_status_changed, "Query_cache::COND_cache_status_changed", 0},
{ &key_COND_manager, "COND_manager", PSI_FLAG_GLOBAL},
@@ -3539,7 +3545,8 @@ static int init_common_variables()
mysql_bin_log.set_psi_keys(key_BINLOG_LOCK_index,
key_BINLOG_update_cond,
key_file_binlog,
- key_file_binlog_index);
+ key_file_binlog_index,
+ key_BINLOG_COND_queue_busy);
#endif
/*
diff --git a/sql/mysqld.h b/sql/mysqld.h
index cd3d7c37b37..26dc47214f6 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -247,8 +247,7 @@ extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock;
#ifdef HAVE_MMAP
-extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool,
- key_COND_queue_busy;
+extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
#endif /* HAVE_MMAP */
extern PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
@@ -262,6 +261,8 @@ extern PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
key_TABLE_SHARE_cond, key_user_level_lock_cond,
key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache;
extern PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready;
+extern PSI_cond_key key_RELAYLOG_COND_queue_busy;
+extern PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
key_thread_handle_manager, key_thread_kill_server, key_thread_main,
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 63ce14c3f89..3b1f3180443 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -61,7 +61,8 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
relay_log.set_psi_keys(key_RELAYLOG_LOCK_index,
key_RELAYLOG_update_cond,
key_file_relaylog,
- key_file_relaylog_index);
+ key_file_relaylog_index,
+ key_RELAYLOG_COND_queue_busy);
#endif
group_relay_log_name[0]= event_relay_log_name[0]=