/ Artifact Content
Login

Artifact 419e98d5f5ceb62153429e772af7f0d3a6bf9a049be4e45a35316e7bf335f6b6:

Ticket change [419e98d5f5] - Closed ticket [c4130c33be081b2e|c4130c33be]: <i>DISTINCT malfunctions for VIEW</i> plus 6 other changes by drh 2019-09-10 19:46:38.
D 2019-09-10T19:46:38.497
J icomment 0\sis\snot\sdistinct\sfrom\s0.0\ssince\s(0\sIS\s0.0)\sIS\sTRUE.\s\sSo\sthe\squery\r\n\r\n<blockquote><verbatim>\r\nSELECT\sDISTINCT\s*\sFROM\s(VALUES(0),(0.0));\r\n</verbatim></blockquote>\r\n\r\nIs\sfree\sto\sreturn\seither\s0\sor\s0.0.\s\sThe\schoice\sis\sarbitrary.\s\sIt\sis\sanalogous\r\nto\sa\sSELECT\swith\sa\s"LIMIT\s1"\sand\swithout\san\sORDER\sBY\sclause\sin\sthat\sthe\squery\r\nis\sfree\sto\sreturn\sany\ssingle\srow\sthat\sit\swants.\r\n\r\nIf\sthe\squery\sdecides\sto\sreturn\s0,\sthen\s0||0.1\sis\sa\sstring\s'00.1'\swhich\r\nevaluates\sto\sTRUE.\s\sIf\sthe\squery\sdecides\sto\sreturn\s0.0,\sthen\s0.0||0.1\sis\s\r\na\sstring\s'0.00.1'\swhich\sevaluates\sto\sfalse.\s\sSo\sthe\sother\squeries\sin\sthe\r\noriginal\sproblem\sstatement\sare\sfree\sto\sreturn\seither\sresult\sdepending\son\r\nwhich\svalue\scomes\sout\sof\sthe\sambiguous\sview.
J login drh
J mimetype text/x-fossil-wiki
J priority Immediate
J resolution Not_A_Bug
J status Closed
J subsystem Unknown
K c4130c33be081b2e75e8eb12b623ff6b67752ed0
U drh
Z ffbc13ba49a4e0da94bc482955a96c69