Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2087 06/03/17 18:46:34 cmiller@stripped +1 -0
No longer leak file descriptors in mysql_close. Fixes Bug#15846.
vio/viosocket.c
1.37 06/03/17 18:46:25 cmiller@stripped +14 -8
ORs were wrong to begin with, but more importantly, we mustn't use
shortable-circuit logic.
Also newly reap the connection-closed event handle.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: cmiller
# Host: calliope.local
# Root: /Volumes/Source/src/mysql-5.0__bug15846
--- 1.36/vio/viosocket.c 2005-10-13 16:36:42 +02:00
+++ 1.37/vio/viosocket.c 2006-03-17 18:46:25 +01:00
@@ -560,14 +560,20 @@
Close all handlers. UnmapViewOfFile and CloseHandle return non-zero
result if they are success.
*/
- r= UnmapViewOfFile(vio->handle_map) || CloseHandle(vio->event_server_wrote) ||
- CloseHandle(vio->event_server_read) || CloseHandle(vio->event_client_wrote)
||
- CloseHandle(vio->event_client_read) || CloseHandle(vio->handle_file_map);
- if (!r)
- {
- DBUG_PRINT("vio_error", ("close() failed, error: %d",r));
- /* FIXME: error handling (not critical for MySQL) */
- }
+ if (UnmapViewOfFile(vio->handle_map) == 0)
+ DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed"));
+ if (CloseHandle(vio->event_server_wrote) == 0)
+ DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed"));
+ if (CloseHandle(vio->event_server_read) == 0)
+ DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed"));
+ if (CloseHandle(vio->event_client_wrote) == 0)
+ DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed"));
+ if (CloseHandle(vio->event_client_read) == 0)
+ DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed"));
+ if (CloseHandle(vio->handle_file_map) == 0)
+ DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed"));
+ if (CloseHandle(vio->event_conn_closed) == 0)
+ DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed"));
}
vio->type= VIO_CLOSED;
vio->sd= -1;
| Thread |
|---|
| • bk commit into 5.0 tree (cmiller:1.2087) BUG#15846 | Chad MILLER | 17 Mar |