Skip to content

Commit 2a597af

Browse files
author
Tor Didriksen
committed
Bug #34017614 Add support for Apple M1 to MySQL 5.7 [33559219]
Backport 0ace2aa267f72460bf9c0a978ab38c5b9bb3888c BUG #33559219 Crash in pthread_cond_signal on bus error on Mac OS X ARM Moved NdbCondition_Signal into the mutex context to avoid the condition being destroyed during execution of NdbCondition_Signal. Change-Id: I8e6e7c59c8ab34f12c810eb158d54eba13b88702
1 parent 980e7c9 commit 2a597af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

storage/ndb/src/kernel/blocks/ndbfs/AsyncIoThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
1+
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -138,8 +138,8 @@ AsyncIoThread::run()
138138
// Create theMemoryChannel in the thread that will wait for it
139139
NdbMutex_Lock(theStartMutexPtr);
140140
theStartFlag = true;
141-
NdbMutex_Unlock(theStartMutexPtr);
142141
NdbCondition_Signal(theStartConditionPtr);
142+
NdbMutex_Unlock(theStartMutexPtr);
143143

144144
EmulatedJamBuffer jamBuffer;
145145
jamBuffer.theEmulatedJamIndex = 0;

storage/ndb/src/ndbapi/NdbPoolImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2003, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -286,8 +286,8 @@ NdbPool::return_ndb_object(Ndb* returned_ndb, Uint32 id)
286286
pool_cond = input_pool_cond;
287287
}
288288
add_wait_list(id);
289-
NdbMutex_Unlock(pool_mutex);
290289
NdbCondition_Signal(pool_cond);
290+
NdbMutex_Unlock(pool_mutex);
291291
} else {
292292
add_free_list(id);
293293
add_db_hash(id);

0 commit comments

Comments
 (0)