Commit 2c360c02 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org

Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0

into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents 9bd57aa4 41a5f79a
...@@ -103,7 +103,8 @@ struct com_shm_endpoint_struct{ ...@@ -103,7 +103,8 @@ struct com_shm_endpoint_struct{
the area currently may contain a datagram; the area currently may contain a datagram;
NOTE: automatic event */ NOTE: automatic event */
os_event_t empty; /* this is in the signaled state if the area os_event_t empty; /* this is in the signaled state if the area
currently may be empty; NOTE: automatic event */ currently may be empty; NOTE: automatic
event */
ip_mutex_hdl_t* ip_mutex; /* handle to the interprocess mutex ip_mutex_hdl_t* ip_mutex; /* handle to the interprocess mutex
protecting the shared memory */ protecting the shared memory */
UT_LIST_NODE_T(com_shm_endpoint_t) list; /* If the endpoint struct UT_LIST_NODE_T(com_shm_endpoint_t) list; /* If the endpoint struct
...@@ -793,16 +794,18 @@ com_shm_create_or_open( ...@@ -793,16 +794,18 @@ com_shm_create_or_open(
ut_strcpy(buf + len, (char*)"_IBSHM_EV_NE"), ut_strcpy(buf + len, (char*)"_IBSHM_EV_NE"),
event_ne = os_event_create_auto(buf); event_ne = os_event_create(buf);
ut_ad(event_ne); ut_ad(event_ne);
ut_strcpy(buf + len, (char*)"_IBSHM_EV_EM"), ut_strcpy(buf + len, (char*)"_IBSHM_EV_EM"),
event_em = os_event_create_auto(buf); event_em = os_event_create(buf);
ut_ad(event_em); ut_ad(event_em);
ut_a(0); /* event_ne and event_em should be auto events! */
com_shm_endpoint_set_shm(ep, shm); com_shm_endpoint_set_shm(ep, shm);
com_shm_endpoint_set_map(ep, map); com_shm_endpoint_set_map(ep, map);
......
...@@ -88,6 +88,12 @@ os_sync_free(void) ...@@ -88,6 +88,12 @@ os_sync_free(void)
mutex = UT_LIST_GET_FIRST(os_mutex_list); mutex = UT_LIST_GET_FIRST(os_mutex_list);
while (mutex) { while (mutex) {
if (mutex == os_sync_mutex) {
/* Set the flag to FALSE so that we do not try to
reserve os_sync_mutex any more in remaining freeing
operations in shutdown */
os_sync_mutex_inited = FALSE;
}
os_mutex_free(mutex); os_mutex_free(mutex);
...@@ -517,13 +523,17 @@ os_mutex_free( ...@@ -517,13 +523,17 @@ os_mutex_free(
{ {
ut_a(mutex); ut_a(mutex);
os_mutex_enter(os_sync_mutex); if (os_sync_mutex_inited) {
os_mutex_enter(os_sync_mutex);
}
UT_LIST_REMOVE(os_mutex_list, os_mutex_list, mutex); UT_LIST_REMOVE(os_mutex_list, os_mutex_list, mutex);
os_mutex_count--; os_mutex_count--;
os_mutex_exit(os_sync_mutex); if (os_sync_mutex_inited) {
os_mutex_exit(os_sync_mutex);
}
#ifdef __WIN__ #ifdef __WIN__
ut_a(CloseHandle(mutex->handle)); ut_a(CloseHandle(mutex->handle));
...@@ -614,9 +624,16 @@ os_fast_mutex_free( ...@@ -614,9 +624,16 @@ os_fast_mutex_free(
#else #else
ut_a(0 == pthread_mutex_destroy(fast_mutex)); ut_a(0 == pthread_mutex_destroy(fast_mutex));
#endif #endif
os_mutex_enter(os_sync_mutex); if (os_sync_mutex_inited) {
/* When freeing the last mutexes, we have
already freed os_sync_mutex */
os_mutex_enter(os_sync_mutex);
}
os_fast_mutex_count--; os_fast_mutex_count--;
os_mutex_exit(os_sync_mutex); if (os_sync_mutex_inited) {
os_mutex_exit(os_sync_mutex);
}
} }
...@@ -2081,8 +2081,13 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) ...@@ -2081,8 +2081,13 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
else else
{ {
sql_print_error("\ sql_print_error("\
Could not parse log event entry, check the master for binlog corruption\n\ Could not parse relay log event entry. The possible reasons are: the master's \
This may also be a network problem, or just a bug in the master or slave code.\ binary log is corrupted (you can check this by running 'mysqlbinlog' on the \
binary log), the slave's relay log is corrupted (you can check this by running \
'mysqlbinlog' on the relay log), a network problem, or a bug in the master's \
or slave's MySQL code. If you want to check the master's binary log or slave's \
relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' \
on this slave.\
"); ");
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment