Skip to content

Allowing both Charset & Collation #808

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
wants to merge 4 commits into from
Closed

Allowing both Charset & Collation #808

wants to merge 4 commits into from

Conversation

tgriesser
Copy link

@dougwilson here's the change that allows specifying both charset & collation in the config, per our discussion. Feel free to change it if you'd prefer there only be one option charset for now rather than both charset and collation so as not to confuse things.

@dougwilson dougwilson added this to the 2.3 milestone May 6, 2014
@dougwilson dougwilson self-assigned this May 6, 2014
@dougwilson
Copy link
Member

Thanks :) I'll look at this later today.

@dougwilson
Copy link
Member

One change I'm going to propose from our conversation is that you either:

  1. Remove the collation configuration option and just use charset for both.

or

  1. Add a check that will throw if both are specified and do not agree with each other.

You can update your master branch with whichever, or I'll just cherry pick your PR with option 1 automatically :)

@tgriesser
Copy link
Author

Updated with 2, I think it's a little cleaner to have config options that correspond to their values.

@@ -17,22 +17,22 @@ test('ConnectionConfig#Constructor', {
},

'allows additional options via url query': function() {
var url = 'mysql://myhost/mydb?debug=true&charset=BIG5_CHINESE_CI';
var url = 'mysql://myhost/mydb?debug=true&collation=BIG5_CHINESE_CI';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this test change; even though it'll say the old "charset"; it needs to work and we don't want to alter existing tests if not necessary (this of this test testing that you can still get charset a collation).

@tgriesser
Copy link
Author

Updated, let me know if there's anything else you spot here.

@dougwilson
Copy link
Member

Thanks for the ping :) I saw the update earlier and was glad to see the test passed. I'll get to it as soon as I can.

dveeden pushed a commit to dveeden/mysql that referenced this pull request Jan 31, 2023
* auth: add sha256_password implementation

* auth: fix sha256_password implementation

* auth: add sha256_password tests

* auth: remove test pub key by ascii encoded version

* packets: allow auth responses longer than 255 bytes

* utils: correct naming of registries

* auth: allow using a local server pub key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants