Skip to content

Commit 131765b

Browse files
committed
Bug #26588738 : MEMCACHED.MEMC280_MISC FAILS WITH SIG 11 ON PB2
Background: memcached plugin listens to a specific (hardocded) port in MTR tests. Therefore when a testcase is executed in parallel to itself, it might fail with an error that port is in use. Which is expected. And then memcached plugin code goes for a cleanup. Issue: In memcached code, my_thread_init() was taken out from handler_create_thd(). Thus, during cleanup, when handler_create_thd() is called, it crashes (as thd is not initialized and THR_mysys is NULL). It was not failing in MySQL 5.7 because in 5.7, my_thread_init() was inside handler_create_thd(). Fix: Before calling handler_create_thd(), make sure to call my_thread_init(), to initialized thread. Reviewed by: [email protected] RB: 17547
1 parent 397bc5d commit 131765b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ innodb_conn_clean(
786786
void* thd = NULL;
787787

788788
if (clear_all) {
789+
my_thread_init();
789790
thd = handler_create_thd(engine->enable_binlog);
790791
}
791792

@@ -859,6 +860,7 @@ innodb_conn_clean(
859860
if (thd) {
860861
handler_thd_attach(thd, NULL);
861862
handler_close_thd(thd);
863+
my_thread_end();
862864
}
863865

864866
return(num_freed);

0 commit comments

Comments
 (0)