mariadb/client
Vladislav Vaintroub 4dfbf2ec93 Bug#38522: 5 seconds delay when closing application using embedded server
The problem here is that embedded server starts handle_thread manager 
thread  on mysql_library_init() does not stop it on mysql_library_end().
At shutdown, my_thread_global_end() waits for thread count to become 0,
but since we did not stop the thread it will give up after 5 seconds.
             
Solution is to move shutdown for handle_manager thread from kill_server()
(mysqld specific) to clean_up() that is used by both embedded and mysqld.
            
This patch also contains some refactorings - to avoid duplicate code,
start_handle_manager() and stop_handle_manager() functions are introduced.
Unused variables are eliminated. handle_manager does not rely on global
variable abort_loop anymore to stop (abort_loop is not set for embedded).
            
Note: Specifically on Windows and when using DBUG version of libmysqld, 
the complete solution requires removing obsolete code my_thread_init() 
from my_thread_var(). This has a side effect that a DBUG statement 
after my_thread_end() can cause thread counter to be incremented, and 
embedded will hang for some seconds. Or worse, my_thread_init() will 
crash if critical sections have been deleted by the global cleanup 
routine that runs in a different thread. 

This patch also fixes and revert prior changes for Bug#38293 
"Libmysqld crash in mysql_library_init if language file missing".

Root cause of the crash observed in Bug#38293  was bug in my_thread_init() 
described above
2008-12-04 19:41:53 +01:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
client_priv.h Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1 2008-01-31 17:46:50 +01:00
CMakeLists.txt Bug#37003 Tests sporadically crashes with embedded server 2008-06-18 13:17:15 -03:00
completion_hash.cc WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
completion_hash.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
echo.c echo.c: 2007-03-20 18:31:49 +01:00
get_password.c fixes for build failures due to my yesterday's changeset forbidding 2008-02-19 18:45:11 +01:00
Makefile.am Bug#31455 mysqlbinlog don't print user readable info about RBR events 2008-08-20 19:06:31 +05:00
my_readline.h WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mysql.cc Bug#38522: 5 seconds delay when closing application using embedded server 2008-12-04 19:41:53 +01:00
mysql_upgrade.c Backport compiler warning fix from 5.1-bugteam. 2008-08-11 11:28:35 -04:00
mysqladmin.cc Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint 2007-09-15 05:12:02 +02:00
mysqlbinlog.cc Additional fix for bug#31455 (rpl decoder) 2008-08-21 16:47:23 +05:00
mysqlcheck.c Auto-merge 2008-11-14 13:48:01 +04:00
mysqldump.c Bug#31434 mysqldump dumps view as table 2008-09-11 08:14:19 +02:00
mysqlimport.c Merge hynda.mysql.fi:/home/my/mysql-5.1-main 2007-11-08 13:23:08 +02:00
mysqlshow.c Merge hynda.mysql.fi:/home/my/mysql-5.1-main 2007-11-08 13:23:08 +02:00
mysqlslap.c Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main 2008-02-08 12:13:33 +01:00
mysqltest.c auto-merge + post-merge fixies 2008-07-21 11:20:03 +02:00
readline.cc WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
sql_string.cc Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris 2007-08-13 16:11:25 +03:00
sql_string.h Fixed compiler warnings 2007-02-23 13:13:55 +02:00