Skip to content

Commit 5601e0e

Browse files
committed
[CONJS-57] correcting multi-authentication in compress mode
1 parent e5401d0 commit 5601e0e

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

lib/cmd/handshake/auth/clear-password-auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const PluginAuth = require('./plugin-auth');
55
* (used only when SSL is active)
66
*/
77
class ClearPasswordAuth extends PluginAuth {
8-
constructor(packSeq, pluginData, resolve, reject, multiAuthResolver) {
8+
constructor(packSeq, compressPackSeq, pluginData, resolve, reject, multiAuthResolver) {
99
super(resolve, reject, multiAuthResolver);
1010
this.sequenceNo = packSeq;
1111
}

lib/cmd/handshake/auth/ed25519-password-auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Crypto = require('crypto');
77
* Standard authentication plugin
88
*/
99
class Ed25519PasswordAuth extends PluginAuth {
10-
constructor(packSeq, pluginData, resolve, reject, multiAuthResolver) {
10+
constructor(packSeq, compressPackSeq, pluginData, resolve, reject, multiAuthResolver) {
1111
super(resolve, reject, multiAuthResolver);
1212
this.pluginData = pluginData;
1313
this.sequenceNo = packSeq;

lib/cmd/handshake/auth/native-password-auth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ const Crypto = require('crypto');
77
* Standard authentication plugin
88
*/
99
class NativePasswordAuth extends PluginAuth {
10-
constructor(packSeq, pluginData, resolve, reject, multiAuthResolver) {
10+
constructor(packSeq, compressPackSeq, pluginData, resolve, reject, multiAuthResolver) {
1111
super(resolve, reject, multiAuthResolver);
1212
this.pluginData = pluginData;
1313
this.sequenceNo = packSeq;
14+
this.compressSequenceNo = compressPackSeq;
1415
}
1516

1617
start(out, opts, info) {

lib/cmd/handshake/auth/pam-password-auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const PluginAuth = require('./plugin-auth');
44
* Use PAM authentication
55
*/
66
class PamPasswordAuth extends PluginAuth {
7-
constructor(packSeq, pluginData, resolve, reject, multiAuthResolver) {
7+
constructor(packSeq, compressPackSeq, pluginData, resolve, reject, multiAuthResolver) {
88
super(resolve, reject, multiAuthResolver);
99
this.pluginData = pluginData;
1010
this.sequenceNo = packSeq;

lib/cmd/handshake/handshake.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class Handshake extends Command {
145145
const plugin = Handshake.pluginHandler(
146146
pluginName,
147147
this.plugin.sequenceNo,
148+
this.plugin.compressSequenceNo,
148149
pluginData,
149150
info,
150151
opts,
@@ -175,6 +176,7 @@ class Handshake extends Command {
175176
static pluginHandler(
176177
pluginName,
177178
packSeq,
179+
compressPackSeq,
178180
pluginData,
179181
info,
180182
opts,
@@ -206,7 +208,14 @@ class Handshake extends Command {
206208
default:
207209
return null;
208210
}
209-
return new pluginAuth(packSeq, pluginData, authResolve, authReject, multiAuthResolver);
211+
return new pluginAuth(
212+
packSeq,
213+
compressPackSeq,
214+
pluginData,
215+
authResolve,
216+
authReject,
217+
multiAuthResolver
218+
);
210219
}
211220
}
212221

test/integration/test-local-infile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ describe('local-infile', () => {
190190
conn
191191
.query(
192192
"LOAD DATA LOCAL INFILE '" +
193-
smallFileName.replace(/\\/g, '/') +
194-
"' INTO TABLE smallLocalInfile FIELDS TERMINATED BY ',' (id, test)"
193+
smallFileName.replace(/\\/g, '/') +
194+
"' INTO TABLE smallLocalInfile FIELDS TERMINATED BY ',' (id, test)"
195195
)
196196
.then(() => {
197197
return conn.query('SELECT * FROM smallLocalInfile');

0 commit comments

Comments
 (0)