Skip to content

Commit

Permalink
存储过程结果集处理
Browse files Browse the repository at this point in the history
  • Loading branch information
ynfeng committed Jul 24, 2017
1 parent c5fc245 commit bf05365
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected boolean backendHandle(MySQLBackendConnection mySQLBackendConnection, O
//多结果集时会返回OK包,此时服务器的状态应该已经不是多结果集的状态了
// MySQLMessage mySQLMessage = new MySQLMessage(dataBuffer);
// mySQLMessage.position(mySQLBackendConnection.getCurrentPacketStartPos());
//TODO serverStatus开始位置计算并不精确
int serverStatus = (int) mySQLBackendConnection.getDataBuffer().getFixInt(
mySQLBackendConnection.getCurrentPacketStartPos() + 7,
2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ protected boolean backendHandle(MySQLBackendConnection mySQLBackendConnection, O
dataBuffer.writeLimit(mySQLBackendConnection.getCurrentPacketLength());
packageType = mySQLBackendConnection.getCurrentPacketType();
if (packageType == MySQLPacket.EOF_PACKET) {
//TODO 开始位置计算并不精确
int serverStatus = (int) dataBuffer.getFixInt(mySQLBackendConnection.getCurrentPacketStartPos()+7,2);
mySQLBackendConnection.setServerStatus(serverStatus);
//检查后面还有没有结果集
Expand Down

0 comments on commit bf05365

Please sign in to comment.