Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle server status in OK packet

  • Loading branch information...
commit 448413a0a4f9d3994cf2ee4e1143cecf5f51585f 1 parent 20c6721
@yihuang authored
Showing with 4 additions and 2 deletions.
  1. +3 −2 lib/Connection.cpp
  2. +1 −0  tests/tests.py
View
5 lib/Connection.cpp
@@ -605,6 +605,7 @@ void *Connection::handleOKPacket()
m_reader.skip();
+ m_has_more_result = serverStatus & SERVER_MORE_RESULTS_EXISTS;
return m_capi.resultOK(affectedRows, insertId, serverStatus, (char *) message, len);
}
@@ -712,8 +713,8 @@ void *Connection::handleResultPacket(int _fieldCount)
// ignore warning count.
m_reader.readBytes(2);
- UINT16 server_status = m_reader.readShort();
- m_has_more_result = server_status & SERVER_MORE_RESULTS_EXISTS;
+ UINT16 serverStatus = m_reader.readShort();
+ m_has_more_result = serverStatus & SERVER_MORE_RESULTS_EXISTS;
m_reader.skip();
break;
View
1  tests/tests.py
@@ -776,6 +776,7 @@ def testMultiResult(self):
self.assertEquals([(2,)], cnn.nextset().rows)
self.assertEquals([(3,)], cnn.nextset().rows)
self.assertEquals((0,0), cnn.nextset())
+ self.assertEquals(None, cnn.nextset())
if __name__ == '__main__':
from guppy import hpy
Please sign in to comment.
Something went wrong with that request. Please try again.