summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-23 00:32:25 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-23 00:32:25 +0300
commitf277f27ae2fb4ab45a014027f08093a28acc1c14 (patch)
treee8e1c9bd3f005871e29b35d7383d843f446645f9 /extra
parentf1159b18d930910d5b5b9c454a17b0ee66f853c3 (diff)
downloadmariadb-git-f277f27ae2fb4ab45a014027f08093a28acc1c14.tar.gz
Fixing test cases
Added missing system tables used in 5.6
Diffstat (limited to 'extra')
-rw-r--r--extra/yassl/src/handshake.cpp2
-rw-r--r--extra/yassl/src/socket_wrapper.cpp18
2 files changed, 17 insertions, 3 deletions
diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp
index fb342a10fd5..3a1ade9816c 100644
--- a/extra/yassl/src/handshake.cpp
+++ b/extra/yassl/src/handshake.cpp
@@ -529,7 +529,7 @@ void ProcessOldClientHello(input_buffer& input, SSL& ssl)
ato16(len, randomLen);
if (ch.suite_len_ > MAX_SUITE_SZ || sessionLen > ID_LEN ||
- randomLen > RAN_LEN) {
+ randomLen > RAN_LEN) {
ssl.SetError(bad_input);
return;
}
diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
index cf761d912e6..4d41c4f8442 100644
--- a/extra/yassl/src/socket_wrapper.cpp
+++ b/extra/yassl/src/socket_wrapper.cpp
@@ -202,8 +202,22 @@ uint Socket::receive(byte* buf, unsigned int sz, int flags)
// wait if blocking for input, return false for error
bool Socket::wait()
{
- byte b;
- return receive(&b, 1, MSG_PEEK) != static_cast<uint>(-1);
+ char b;
+ int recvd = ::recv(socket_, &b, 1, MSG_PEEK);
+
+ if (recvd == -1) {
+ if (get_lastError() == SOCKET_EWOULDBLOCK ||
+ get_lastError() == SOCKET_EAGAIN) {
+ wouldBlock_ = true; // would have blocked this time only
+ nonBlocking_ = true; // socket nonblocking, win32 only way to tell
+ return 1;
+ }
+ }
+ else if (recvd == 0)
+ return 0; // Non blocking & no data
+
+ return 1; // Data can be read
+
}