| Bug #61745 | Event Object Leak In Windows Platform? | ||
|---|---|---|---|
| Submitted: | 5 Jul 2011 4:21 | Modified: | 6 Jul 2011 7:40 |
| Reporter: | Lighting Ming | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
| Version: | 5.1.56 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
[5 Jul 2011 6:35]
Lighting Ming
0:000> kb ChildEBP RetAddr Args to Child 0012fed8 10036886 00000000 00000000 00000000 kernel32!CreateEventA 0012fef4 1003493d 10235ea0 00000000 00000000 LIBMYSQL!pthread_cond_init+0x26 [g:\mysql-5.1.56-winbuild\mysql-community-nt-5.1.56-build\mysys\my_wincond.c @ 42] 0012ff04 100326c9 10028d56 01c8f760 1000b40b LIBMYSQL!my_thread_global_init+0x9d [g:\mysql-5.1.56-winbuild\mysql-community-nt-5.1.56-build\mysys\my_thr_init.c @ 155] 0012ff08 10028d56 01c8f760 1000b40b 00000000 LIBMYSQL!my_init+0x39 [g:\mysql-5.1.56-winbuild\mysql-community-nt-5.1.56-build\mysys\my_init.c @ 81] 0012ff10 1000b40b 00000000 00000000 00000000 LIBMYSQL!mysql_server_init+0x26 [g:\mysql-5.1.56-winbuild\mysql-community-nt-5.1.56-build\libmysql\libmysql.c @ 125] 0012ff20 0040106c 00000000 01c8f6f2 01c8f760 LIBMYSQL!mysql_init+0xb [g:\mysql-5.1.56-winbuild\mysql-community-nt-5.1.56-build\sql-common\client.c @ 1535]
[6 Jul 2011 7:40]
Lighting Ming
Call mysql_thread_end() Can Fix This Problem.....

Description: Even Object Create In my_thread_global_init()->pthread_cond_init()[my_wincond.c] Maybe Not CloseHandle In my_thread_global_end Since A Condition if (all_threads_killed) { pthread_mutex_destroy(&THR_LOCK_threads); pthread_cond_destroy(&THR_COND_threads); } Does It A Bug? How to repeat: MYSQL* pMySql = NULL; for ( int i = 0; i < 100; ++i ) { pMySql = mysql_init(NULL); if ( pMySql ) { mysql_close( pMySql ); pMySql = NULL; } }