summaryrefslogtreecommitdiff
path: root/vio/viosocket.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-11-21 19:13:14 +0200
committerMichael Widenius <monty@askmonty.org>2011-11-21 19:13:14 +0200
commita8d03ab23519d4afc288a6490676ddb8745e3e72 (patch)
treee55f53ff3cc4b044769ca269561a933e3c93f05f /vio/viosocket.c
parent04f3ecf632816a940e2838949e0216d638436fd8 (diff)
parent13fefeb04ade34418cd9d99aa93bffb69fdae27e (diff)
downloadmariadb-git-a8d03ab23519d4afc288a6490676ddb8745e3e72.tar.gz
Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
Diffstat (limited to 'vio/viosocket.c')
-rw-r--r--vio/viosocket.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index f47a7a10ad2..381d028d6a0 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -1,17 +1,20 @@
-/* Copyright (C) 2000 MySQL AB
+/*
+ Copyright (c) 2001, 2011, Oracle and/or its affiliates
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/*
Note that we can't have assertion on file descriptors; The reason for
@@ -561,7 +564,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
{
size_t length;
size_t remain_local;
- char *current_postion;
+ char *current_position;
HANDLE events[2];
DBUG_ENTER("vio_read_shared_memory");
@@ -569,7 +572,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
size));
remain_local = size;
- current_postion=buf;
+ current_position=buf;
events[0]= vio->event_server_wrote;
events[1]= vio->event_conn_closed;
@@ -603,11 +606,11 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
if (length > remain_local)
length = remain_local;
- memcpy(current_postion,vio->shared_memory_pos,length);
+ memcpy(current_position,vio->shared_memory_pos,length);
vio->shared_memory_remain-=length;
vio->shared_memory_pos+=length;
- current_postion+=length;
+ current_position+=length;
remain_local-=length;
if (!vio->shared_memory_remain)
@@ -627,7 +630,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
{
size_t length, remain, sz;
HANDLE pos;
- const uchar *current_postion;
+ const uchar *current_position;
HANDLE events[2];
DBUG_ENTER("vio_write_shared_memory");
@@ -635,7 +638,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
size));
remain = size;
- current_postion = buf;
+ current_position = buf;
events[0]= vio->event_server_read;
events[1]= vio->event_conn_closed;
@@ -653,9 +656,9 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
int4store(vio->handle_map,sz);
pos = vio->handle_map + 4;
- memcpy(pos,current_postion,sz);
+ memcpy(pos,current_position,sz);
remain-=sz;
- current_postion+=sz;
+ current_position+=sz;
if (!SetEvent(vio->event_client_wrote))
DBUG_RETURN((size_t) -1);
}