Skip to content

connection.changeUser fails #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ngorchilov opened this issue Oct 25, 2013 · 2 comments
Closed

connection.changeUser fails #622

ngorchilov opened this issue Oct 25, 2013 · 2 comments

Comments

@ngorchilov
Copy link

Two issues discovered with changeUser:

  1. ReferenceError: Config is not defined
/z/bs/node_modules/mysql/lib/Connection.js:84
    ? Config.getCharsetNumber(options.charset)
      ^
ReferenceError: Config is not defined
  1. Fixing problem as renaming Config to ConnectionConfig leads to another issue:
/z/bs/node_modules/mysql/lib/protocol/sequences/ChangeUser.js:19
  var scrambleBuff = handshakeInitializationPacket.scrambleBuff();
                                                   ^
TypeError: Cannot call method 'scrambleBuff' of undefined
@rwky
Copy link
Contributor

rwky commented Oct 25, 2013

I can replicate (and fix) 1. but I'm not getting the error in 2. Can you provide some sample code? Are you using the latest version from the master branch?

@rwky
Copy link
Contributor

rwky commented Oct 25, 2013

Ah never mind part 2 was fixed in #618. I'll create a pull request to fix 1

felixge added a commit that referenced this issue Oct 25, 2013
slavisa1014 added a commit to slavisa1014/mysql that referenced this issue Jan 30, 2025
ReferenceError: Config is not defined when using connection.changeUser
and changing the charset
slavisa1014 added a commit to slavisa1014/mysql that referenced this issue Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants