Skip to content

Commit

Permalink
fix for hexdump
Browse files Browse the repository at this point in the history
  • Loading branch information
puritys committed May 19, 2015
1 parent 0e1a73d commit 2eec498
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nodejs/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var packet = require('./mysql/packet.js');

var clientFlags = require('./mysql/clientFlags.js');
var Crypto = require('crypto');
var hexdump = require('hexdump-nodejs');
//var hexdump = require('hexdump-nodejs');

var serverInfo;

Expand Down Expand Up @@ -79,7 +79,7 @@ function mysql_login(serverInfo, user, password, dbName) {//{{{

}
var result = writer.getResult();
console.log(hexdump(result));
// console.log(hexdump(result));

socket.sendcmd(result, serverInfo['session']);
}//}}}
Expand Down Expand Up @@ -124,7 +124,7 @@ function mysqli_connect(host, user, password, dbName, port) {
reader = new packetReader(res);
resInfo['header'] = reader.readInteger(1);

var b = new Buffer(res, 'binary');console.log(hexdump(b));
// var b = new Buffer(res, 'binary');console.log(hexdump(b));
if (resInfo['header'] === 0 ) {
//Successfully login
resInfo['affectedRows'] = reader.readLengthEncodedInteger();
Expand Down Expand Up @@ -153,7 +153,7 @@ function mysql_query(sql) {
writer.writeString(sql);
result = writer.getResult(0);

var b = new Buffer(result, 'binary');console.log(hexdump(b));
// var b = new Buffer(result, 'binary');console.log(hexdump(b));

socket.sendcmd(result, serverInfo['session']);

Expand All @@ -162,7 +162,7 @@ function mysql_query(sql) {
reader = new packetReader(res);
resInfo['header'] = reader.readInteger(1);

var b = new Buffer(res, 'binary');console.log(hexdump(b));
// var b = new Buffer(res, 'binary');console.log(hexdump(b));
if (resInfo['header'] === 0xFF) {
// Error
resInfo = packet.readError(serverInfo, reader);
Expand Down

0 comments on commit 2eec498

Please sign in to comment.