From 33a02e3f9224cda378c97366362d717e5dd3e286 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 10 Nov 2009 12:23:55 -0200 Subject: Backport of Bug#47304 to mysql-next-mr ------------------------------------------------------------ revno: 3624 revision-id: jon.hauglid@sun.com-20090928163426-2lg1gofzz44xzzxf parent: alik@sun.com-20090928050057-r0a62x9czr01q7oe committer: Jon Olav Hauglid branch nick: mysql-6.0-codebase-bugfixing-bug47304 timestamp: Mon 2009-09-28 18:34:26 +0200 message: Bug #47304 Test main.mdl_sync fails on embedded server The problem was that SHOW PROCESSLIST was trying to access a thread that was not properly running and therefore had an uninitialized mutex. This patch explicitly resets thd->mysys_var after each embedded server command to prevent the mutex from being accessed in an illegal state. The patch also re-enables lock_multi.test and mdl_sync.test for embedded server as they had been disabled because of this bug. --- libmysqld/lib_sql.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'libmysqld') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 1a078d0d0c6..9717c2fcfb6 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -138,6 +138,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, result= dispatch_command(command, thd, (char *) arg, arg_length); thd->cur_data= 0; + thd->mysys_var= NULL; if (!skip_check) result= thd->is_error() ? -1 : 0; -- cgit v1.2.1