Skip to content

Commit efe3451

Browse files
committed
[misc] removing unused code
1 parent 31a3462 commit efe3451

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

lib/cmd/change-user.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
const Errors = require("../misc/errors");
43
const Iconv = require("iconv-lite");
54
const Capabilities = require("../const/capabilities");
65
const NativePasswordAuth = require("./handshake/auth/native_password_auth");
@@ -134,50 +133,6 @@ class ChangeUser extends Handshake {
134133
connOpts.password = opt.password;
135134
}
136135

137-
/**
138-
* Read ping response packet.
139-
* packet can be :
140-
* - an ERR_Packet
141-
* - a OK_Packet
142-
*
143-
* @param packet query response
144-
* @param out output writer
145-
* @param opts connection options
146-
* @param info connection info
147-
* @returns {null}
148-
*/
149-
readChangeUserResponsePacket(packet, out, opts, info) {
150-
switch (packet.peek()) {
151-
//*********************************************************************************************************
152-
//* OK response
153-
//*********************************************************************************************************
154-
case 0x00:
155-
packet.skip(1); //skip header
156-
info.status = packet.readUInt16();
157-
if (this.onResult) process.nextTick(this.onResult, null);
158-
this.emit("end");
159-
return null;
160-
161-
//*********************************************************************************************************
162-
//* ERROR response
163-
//*********************************************************************************************************
164-
case 0xff:
165-
const err = packet.readError(info);
166-
this.throwError(err);
167-
return null;
168-
169-
default:
170-
const errUnexpected = Errors.createError(
171-
"unexpected packet",
172-
false,
173-
info,
174-
"42000",
175-
Errors.ER_CHANGE_USER_BAD_PACKET
176-
);
177-
this.throwError(errUnexpected);
178-
return null;
179-
}
180-
}
181136
}
182137

183138
function writeParam(out, val, encoding) {

0 commit comments

Comments
 (0)