Skip to content

Commit

Permalink
[CONJ-172] Return from result set not checked creating connection
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Jul 29, 2015
1 parent 6950939 commit 297b234
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,9 @@ private void connect(String host, int port) throws QueryException, IOException{
SelectQueryResult qr = null;
try {
qr = (SelectQueryResult) executeQuery(new MySQLQuery("show variables like 'max_allowed_packet'"));
qr.next();
setMaxAllowedPacket(qr.getValueObject(1).getInt());
if (qr.next()) {
setMaxAllowedPacket(qr.getValueObject(1).getInt());
}
} finally {
if (qr != null)qr.close();
}
Expand Down

0 comments on commit 297b234

Please sign in to comment.