/ Artifact Content
Login

Artifact c83cd179b0254e660c0d7bb474d4e0abf99dece2d746e0f889d042f084440182:

Ticket change [c83cd179] - New ticket [fb8c538a] Incorrect sorting when a column uses BINARY collation in the ORDER BY, but is constrained by an == with a different collation in the WHERE clause. by dan 2020-02-12 06:21:39.
D 2020-02-12T06:21:39.600
J foundin 3.31.0
J icomment Example:\r\n\r\n<verbatim>\r\n\s\sCREATE\sTABLE\st1(b\sCOLLATE\snocase);\r\n\s\sINSERT\sINTO\st1\sVALUES('abc');\r\n\s\sINSERT\sINTO\st1\sVALUES('ABC');\r\n\s\sINSERT\sINTO\st1\sVALUES('aBC');\r\n\r\n\s\s--\scorrectly\sreturns:\s"ABC\saBC\sabc"\r\n\s\sSELECT\s*\sFROM\st1\sORDER\sBY\sb\sCOLLATE\sbinary;\r\n\r\n\s\s--\sincorrectly\somits\sexternal\ssort\sand\sreturns:\s"abc\sABC\saBC"\r\n\s\sSELECT\s*\sFROM\st1\sWHERE\sb='abc'\sORDER\sBY\sb\sCOLLATE\sbinary;\r\n</verbatim>
J login dan
J mimetype text/x-fossil-wiki
J severity Minor
J status Open
J title Incorrect\ssorting\swhen\sa\scolumn\suses\sBINARY\scollation\sin\sthe\sORDER\sBY,\sbut\sis\sconstrained\sby\san\s==\swith\sa\sdifferent\scollation\sin\sthe\sWHERE\sclause
J type Code_Defect
K fb8c538a8f57ae2a69540a293141dcc9dfb832b5
U dan
Z 370e069191f63f8c61cac777d44408e1