From ba7a2a9ab788748b2dffa8526fd4aa1d9396a26e Mon Sep 17 00:00:00 2001 From: unknown <guilhem@gbichot3.local> Date: Wed, 20 Dec 2006 22:30:00 +0100 Subject: [PATCH] Maria - fixes to the pagecache unit tests (which started to print "x threads didn't exit" today after my merge); the main() thread was calling my_init() and my_thread_global_init() which is redudant; it was not calling my_end() though it's needed. unittest/mysys/mf_pagecache_consist.c: program already calls my_init(), which calls my_thread_global_init(), so no need for my_thread_global_init() (double call caused the main() thread to wait for itself thus timing out and printing "x threads didn't exit". my_thread_global_end() is not enough, as we call my_init() we must call my_end() (which calls my_thread_global_end()). unittest/mysys/mf_pagecache_single.c: program already calls my_init(), which calls my_thread_global_init(), so no need for my_thread_global_init() (double call caused the main() thread to wait for itself thus timing out and printing "x threads didn't exit". my_thread_global_end() is not enough, as we call my_init() we must call my_end() (which calls my_thread_global_end()). --- unittest/mysys/mf_pagecache_consist.c | 5 +---- unittest/mysys/mf_pagecache_single.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/unittest/mysys/mf_pagecache_consist.c b/unittest/mysys/mf_pagecache_consist.c index 95c2135edad..d31c19cc746 100755 --- a/unittest/mysys/mf_pagecache_consist.c +++ b/unittest/mysys/mf_pagecache_consist.c @@ -336,9 +336,6 @@ int main(int argc, char **argv __attribute__((unused))) VOID(thr_setconcurrency(2)); #endif - my_thread_global_init(); - - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, PAGE_SIZE, 0)) == 0) { @@ -427,7 +424,7 @@ int main(int argc, char **argv __attribute__((unused))) exit(1); } /*my_delete(file1_name, MYF(0));*/ - my_thread_global_end(); + my_end(0); DBUG_PRINT("info", ("file1 (%d) closed", file1.file)); diff --git a/unittest/mysys/mf_pagecache_single.c b/unittest/mysys/mf_pagecache_single.c index 9c467343156..4fadf2a554f 100644 --- a/unittest/mysys/mf_pagecache_single.c +++ b/unittest/mysys/mf_pagecache_single.c @@ -515,8 +515,6 @@ int main(int argc, char **argv __attribute__((unused))) VOID(thr_setconcurrency(2)); #endif - my_thread_global_init(); - plan(12); if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, @@ -569,7 +567,7 @@ int main(int argc, char **argv __attribute__((unused))) exit(1); } /*my_delete(file1_name, MYF(0));*/ - my_thread_global_end(); + my_end(0); DBUG_PRINT("info", ("file1 (%d) closed", file1.file)); -- 2.30.9