[#417] warn against assumed collation order#420
[#417] warn against assumed collation order#420d-w-moore wants to merge 4 commits intoirods:mainfrom
Conversation
|
i think this covers the concern. and yes, separate section, please. |
Still thinking about the wording though - what do you think about: |
korydraughn
left a comment
There was a problem hiding this comment.
Good stuff.
I was going to recommend moving this into a third section for shared behavior, but that isn't necessary at this time.
| ### Collation Order | ||
|
|
||
| It should be noted, with regard to the case-sensitive query defaults, that one cannot always rely on an assumed | ||
| collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes |
There was a problem hiding this comment.
| collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes | |
| collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes |
| It should be noted, with regard to the case-sensitive query defaults, that one cannot always rely on an assumed | ||
| collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes | ||
| operators such as <, =, >, BETWEEN, and ORDER directly to the backing database, such assumptions are inherently | ||
| non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`: |
There was a problem hiding this comment.
| non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`: | |
| non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`: |
| select DATA_NAME where DATA_NAME between 'a' 'a_' | ||
| ``` | ||
|
|
||
| Under the default American setup of MySQL, for example, 'A' will fall in the range defined by `between` (as corroborated |
There was a problem hiding this comment.
| Under the default American setup of MySQL, for example, 'A' will fall in the range defined by `between` (as corroborated | |
| Under the default American setup of MySQL, for example, `A` will fall in the range defined by `between` (as corroborated |
| It should be noted, with regard to the case-sensitive query defaults, that one cannot always rely on an assumed | ||
| collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes | ||
| operators such as <, =, >, BETWEEN, and ORDER directly to the backing database, such assumptions are inherently | ||
| non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`: |
There was a problem hiding this comment.
To maintain consistency throughout the file, please combine these lines so that they are one long line. The rendered text should not be affected by the change.
| Under the default American setup of MySQL, for example, 'A' will fall in the range defined by `between` (as corroborated | ||
| by testing the result of the query `select 'a' <= 'A' and 'A' <= 'a_'` in the mysql client) and thus be reported among | ||
| GenQuery's results; whereas under the default setup of PostgreSQL, it will not. |
There was a problem hiding this comment.
To maintain consistency throughout the file, please combine these lines so that they are one long line. The rendered text should not be affected by the change.
|
|
||
| It should be noted, with regard to the case-sensitive query defaults, that one cannot always rely on an assumed | ||
| collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes | ||
| operators such as <, =, >, BETWEEN, and ORDER directly to the backing database, such assumptions are inherently |
There was a problem hiding this comment.
Should ORDER be ORDER-BY?
There was a problem hiding this comment.
yes . except in GEnQuery it's just ORDER and ORDER_DESC
There was a problem hiding this comment.
Oh right. Forgot about that in GenQuery1.
alanking
left a comment
There was a problem hiding this comment.
Seems good. Just noticed one thing
| select DATA_NAME where DATA_NAME between 'a' 'a_' | ||
| ``` | ||
|
|
||
| Under the default American setup of MySQL, for example, 'A' will fall in the range defined by `between` (as corroborated by testing the result of the query `select 'a' <= 'A' and 'A' <= 'a_'` in the mysql client) and thus be reported among GenQuery's results; whereas under the default setup of PostgreSQL, it will not. |
There was a problem hiding this comment.
Is "American" how MySQL refers to the default setup?
There was a problem hiding this comment.
No, although I'd assume it to depend on nationality almost certainly.
Maybe United States would be better. Now that I think on it.
There was a problem hiding this comment.
"default MySQL settings for English language installations in the U.S."?
There was a problem hiding this comment.
I recommend looking at the official MySQL docs to see how they describe it. Alternatively, you can mention the options and values which directly influence the behavior. Mentioning the charset or collation options, etc. will make things very clear.
No description provided.