Changeset: 6e21e3623480 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6e21e3623480
Modified Files:
MonetDB5/src/mal/mal_instruction.mx
Branch: default
Log Message:
Accept work from others
diffs (52 lines):
diff -r ef77c97f9e0c -r 6e21e3623480 MonetDB5/src/mal/mal_instruction.mx
--- a/MonetDB5/src/mal/mal_instruction.mx Fri May 21 15:56:46 2010 +0200
+++ b/MonetDB5/src/mal/mal_instruction.mx Fri May 21 15:57:39 2010 +0200
@@ -2743,6 +2743,7 @@
break;
}
return fcnDefinition(mb, p, s, flg, base, len);
+ case NOOPsymbol:
case REMsymbol:
case NOOPsymbol:
if(getVar(mb, getArg(p, 0))->value.val.sval)
diff -r ef77c97f9e0c -r 6e21e3623480 python/monetdb/mapi3.py
--- a/python/monetdb/mapi3.py Fri May 21 15:56:46 2010 +0200
+++ b/python/monetdb/mapi3.py Fri May 21 15:57:39 2010 +0200
@@ -30,9 +30,15 @@
import logging
import struct
from io import BytesIO
+import platform
from monetdb.monetdb_exceptions import *
+# windows doesn't support MSG_WAITALL flag for recv
+flags = None
+if platform.system() != 'Windows':
+ flags = socket.MSG_WAITALL
+
logger = logging.getLogger("monetdb")
@@ -242,7 +248,11 @@
last = unpacked & 1
logger.debug("II: reading %i bytes" % length)
if length > 0:
- result_bytes.write(self.__getbytes(length))
+ count = length
+ while count > 0:
+ recv = self.__getbytes(length)
+ result_bytes.write(recv)
+ count -= len(recv)
result = result_bytes.getvalue()
logger.debug("RX: %s" % result)
@@ -252,7 +262,7 @@
def __getbytes(self, bytes):
"""Read an amount of bytes from the socket"""
try:
- return self.socket.recv(bytes)
+ return self.socket.recv(bytes, flags)
except socket.error as error_str:
raise OperationalError(error_str)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list