Fix unit test after merge from mysql 5.5.35 perfschema
The problem in MariaDB is introduced by this merge commit: c33db2cd The merge comes from mysql and the original author comes from this commit from MySQL: ------------------------------------------------ commit 160b823d146288d66638e4a740d6d2da72f9a689 Author: Marc Alff <marc.alff@oracle.com> Date: Tue Aug 30 12:14:07 2016 +0200 Bug#22551677 SIGNAL 11 IN LF_PINBOX_PUT_PINS Backport to 5.6 ------------------------------------------------ The breaking change is in start_socket_wait_v1 where instead of using m_thread_owner, we make use of my_pthread_getspecific_ptr to fetch a thread local storage value. Unfortunately this invalidates the "m_thread_owner" member when a socket is created. The internals of the socket structure have m_thread_owner set to NULL, but when checking for ownership we actually look at the current thread's key store. This seems incorrect however it is not immediately apparent why. To not diverge from MySQL's reasoning as it is not described what the actual problem was that this commit is trying to fix, I have adjusted the unittest to account for this new behaviour. We destroy the current thread in the unit test, such that the newly created socket actually has no thread owner. The m_thread_owner is untouched in all this.
Showing
Please register or sign in to comment