/ Artifact Content
Login

Artifact 183f1b7c5a12330a3d12dc54616cd162934a4fb3404e81990ef02173210f72d4:

Ticket change [183f1b7c5a] - New ticket [c4130c33be081b2e|c4130c33be] <i>DISTINCT malfunctions for VIEW</i>. by mrigger 2019-09-10 19:07:26.
D 2019-09-10T19:07:26.415
J foundin 3.29.0
J icomment Consider\sthe\sfollowing\stest\scase:\r\n\r\n<pre>\r\nCREATE\sTABLE\st0(c0);\r\nINSERT\sINTO\st0(c0)\sVALUES\s(0.0),\s(0);\r\nCREATE\sVIEW\sv0(c0)\sAS\sSELECT\sDISTINCT\sc0\sFROM\st0;\r\nSELECT\s*\sFROM\sv0;\s--\sexpected:\s0.0,\s0,\sactual:\s0.0\r\n</pre>\r\n\r\nUnexpectedly,\sonly\sone\sof\sthe\szero\svalues\sis\sfetched.\sThis\sbug\scan\sindirectly\sbe\sobserved\sby\sthe\sdifferent\sbehavior\sof\stwo\srelated\squeries:\r\n\r\n<pre>\r\nSELECT\sCOUNT(*)\sFROM\sv0\sWHERE\sv0.c0\s||\s0.1;\s--\s1\r\nSELECT\s(v0.c0\s||\s0.2)\sIS\sTRUE\sFROM\sv0;\s--\s0\r\n</pre>
J login mrigger
J mimetype text/x-fossil-wiki
J severity Critical
J status Open
J title DISTINCT\smalfunctions\sfor\sVIEW
J type Code_Defect
K c4130c33be081b2e75e8eb12b623ff6b67752ed0
U mrigger
Z 160b98b68af6fe0d84325cfddf4b597d