I don't have TCL, so I'm trying to validate sqlite by running some of
the tests by hand.

In insert4.test, there is a sub-test 

do_test insert4-2.4.1 {
  execsql {
    DELETE FROM t3;
    INSERT INTO t3 SELECT DISTINCT * FROM t2;
    SELECT * FROM t3;
  }
} {9 1 1 9}


I can run this test by hand, using the following commands 
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> CREATE TABLE t2(x int, y int);
sqlite> CREATE TABLE t3(a int, b int);
sqlite> INSERT INTO t2 VALUES(9,1);
sqlite> INSERT INTO t2 SELECT y, x FROM t2;
sqlite> SELECT * FROM t2;
9|1
1|9
sqlite>
sqlite> INSERT INTO t3 SELECT DISTINCT * FROM t2;
sqlite> SELECT * FROM t3;
1|9
9|1

Notice the difference in the ordering of the rows.

When I run the same INSERT without the DISTINCT keyword, I get the
expected results

sqlite> DELETE FROM T3;
sqlite> INSERT INTO t3 SELECT * FROM t2;
sqlite> SELECT * FROM t3;
9|1
1|9


So, I have 2 questions:
1) Does this test work when running from tcl?
2) If so, what is different?

Regards,

Noah



CONFIDENTIALITY NOTICE: 
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to