Skip to content

README: document DSN system var quoting rules (#405) #502

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

Merged
merged 2 commits into from
Nov 5, 2016

Conversation

dolmen
Copy link
Contributor

@dolmen dolmen commented Oct 26, 2016

Documentation fix for #405: improve documentation of quoting rules for system var values in DSN.

Fixes #405

@julienschmidt julienschmidt added this to the v1.3 milestone Oct 26, 2016
Examples:
* `autocommit=1`: `SET autocommit=0`
* [`time_zone=%27Europe%2FParis%27`](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html): `SET time_zone='Europe/Paris'`
* [`tx_isolation=%27REPEATABLE-READ%27`](https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_tx_isolation): `SET tx_isolation=REPEATABLE-READ`
Copy link
Member

Choose a reason for hiding this comment

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

This line is not clear. Why are there quotes (%27) in the DSN example, but not in the "translated" system var?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I'll fix that.

@dolmen
Copy link
Contributor Author

dolmen commented Nov 1, 2016

Fixed (following @julienschmidt review) and rebased.

(which implies values of string variables must be wrapped with `%27`)

Examples:
* `autocommit=1`: `SET autocommit=0`
Copy link
Member

Choose a reason for hiding this comment

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

something is wrong here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oups.

Improve documentation of quoting rules for system var values in DSN.
go-sql-driver#405
@dolmen
Copy link
Contributor Author

dolmen commented Nov 4, 2016

Fixed (following @julienschmidt second review) and rebased.

@julienschmidt
Copy link
Member

Thanks, the changes look fine to me now.
However, your entry to the AUTHORS file is missing.

@dolmen
Copy link
Contributor Author

dolmen commented Nov 5, 2016

Added myself to AUTHORS as requested.

@julienschmidt julienschmidt merged commit 2b7dffe into go-sql-driver:master Nov 5, 2016
@julienschmidt
Copy link
Member

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

time_zone DSN parameter value requires quoting
2 participants