mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0--windows-vio-uninit
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint vio/viosocket.c: Auto merged
This commit is contained in:
commit
3cfbb918fc
1 changed files with 27 additions and 2 deletions
|
|
@ -559,9 +559,13 @@ int vio_write_shared_memory(Vio * vio, const gptr buf, int size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Close shared memory and DBUG_PRINT any errors that happen on closing.
|
||||||
|
@return Zero if all closing functions succeed, and nonzero otherwise.
|
||||||
|
*/
|
||||||
int vio_close_shared_memory(Vio * vio)
|
int vio_close_shared_memory(Vio * vio)
|
||||||
{
|
{
|
||||||
int r;
|
int error_count= 0;
|
||||||
DBUG_ENTER("vio_close_shared_memory");
|
DBUG_ENTER("vio_close_shared_memory");
|
||||||
if (vio->type != VIO_CLOSED)
|
if (vio->type != VIO_CLOSED)
|
||||||
{
|
{
|
||||||
|
|
@ -575,23 +579,44 @@ int vio_close_shared_memory(Vio * vio)
|
||||||
result if they are success.
|
result if they are success.
|
||||||
*/
|
*/
|
||||||
if (UnmapViewOfFile(vio->handle_map) == 0)
|
if (UnmapViewOfFile(vio->handle_map) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed"));
|
DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed"));
|
||||||
|
}
|
||||||
if (CloseHandle(vio->event_server_wrote) == 0)
|
if (CloseHandle(vio->event_server_wrote) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed"));
|
DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed"));
|
||||||
|
}
|
||||||
if (CloseHandle(vio->event_server_read) == 0)
|
if (CloseHandle(vio->event_server_read) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed"));
|
DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed"));
|
||||||
|
}
|
||||||
if (CloseHandle(vio->event_client_wrote) == 0)
|
if (CloseHandle(vio->event_client_wrote) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed"));
|
DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed"));
|
||||||
|
}
|
||||||
if (CloseHandle(vio->event_client_read) == 0)
|
if (CloseHandle(vio->event_client_read) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed"));
|
DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed"));
|
||||||
|
}
|
||||||
if (CloseHandle(vio->handle_file_map) == 0)
|
if (CloseHandle(vio->handle_file_map) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed"));
|
DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed"));
|
||||||
|
}
|
||||||
if (CloseHandle(vio->event_conn_closed) == 0)
|
if (CloseHandle(vio->event_conn_closed) == 0)
|
||||||
|
{
|
||||||
|
error_count++;
|
||||||
DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed"));
|
DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
vio->type= VIO_CLOSED;
|
vio->type= VIO_CLOSED;
|
||||||
vio->sd= -1;
|
vio->sd= -1;
|
||||||
DBUG_RETURN(!r);
|
DBUG_RETURN(error_count);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_SMEM */
|
#endif /* HAVE_SMEM */
|
||||||
#endif /* __WIN__ */
|
#endif /* __WIN__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue