On Tue, May 14, 2013 at 3:39 PM, Lauren Foutz <[email protected]>wrote:

>  test 4.10 went from:
>   "SELECT group_concat(y) FROM b2 GROUP BY x" {0,1   3   2,4}
>
> To:
>
>   "SELECT group_concat(y) FROM b2 GROUP BY x" {/#,#   3   #,#/}
>

The other change (that you didn't notice) is that the expected result is
now surrounded by /../.  The /../ means that the expected result is in fact
a regular expression in which # is shorthand for "[0-9]+".

The reason for this change is that the original test made assumptions about
the output that are not necessarily true.  The group_concat() function
promises to concatenate strings together, but it makes no promises about
the order in which they are grouped together.  If three input strings are
A, B, and C, then the output can legally by any of the following:  A,B,C
A,C,B  B,A,C  B,C,A  C,A,B  C,B,A.

In the example above, the test was originally assuming that the output
would always be 0,1, when it could in fact be 1,0.  A change to the query
optimizer caused the output to sometimes appear as 1,0, so we needed to
change the test to accommodate this legal and correct result.

-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to