Changeset: a6e072d5b6b5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6e072d5b6b5
Modified Files:
        sql/test/Tests/add_column_with_seq.stable.out
        sql/test/Tests/default.stable.err
        sql/test/Tests/default.stable.out
        sql/test/Tests/marcin1.stable.out
        sql/test/add_column_with_seq.sql
        sql/test/default.sql
        sql/test/marcin1.sql
Branch: default
Log Message:

Make the tests independent of rest
Use unique table names to avoid interference with other tests.


diffs (truncated from 350 to 300 lines):

diff --git a/sql/test/Tests/add_column_with_seq.stable.out 
b/sql/test/Tests/add_column_with_seq.stable.out
--- a/sql/test/Tests/add_column_with_seq.stable.out
+++ b/sql/test/Tests/add_column_with_seq.stable.out
@@ -34,7 +34,8 @@ Ready.
 # 12:38:48 >  
 
 [ 3    ]
-% sys.t3 # table_name
+#select * from t3addcolumn;
+% sys.t3addcolumn # table_name
 % name # name
 % varchar # type
 % 1 # length
@@ -42,7 +43,8 @@ Ready.
 [ "b"  ]
 [ "c"  ]
 [ 3    ]
-% sys.t2,      sys.t2 # table_name
+#select * from t2addcolumn;
+% sys.t2addcolumn,     sys.t2addcolumn # table_name
 % name,        seq # name
 % varchar,     int # type
 % 1,   1 # length
@@ -50,7 +52,9 @@ Ready.
 [ "b", 2       ]
 [ "c", 3       ]
 [ 3    ]
-% sys.t1,      sys.t1 # table_name
+#alter table t1addcolumn add column seq serial;
+#select * from t1addcolumn;
+% sys.t1addcolumn,     sys.t1addcolumn # table_name
 % name,        seq # name
 % varchar,     int # type
 % 1,   1 # length
diff --git a/sql/test/Tests/default.stable.err 
b/sql/test/Tests/default.stable.err
--- a/sql/test/Tests/default.stable.err
+++ b/sql/test/Tests/default.stable.err
@@ -30,21 +30,22 @@ stderr of test 'default` in directory 's
 # 11:45:04 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=sofia" 
"--port=39182"
 # 11:45:04 >  
 
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
-QUERY = INSERT INTO t1 (id) VALUES(1);
-ERROR = !INSERT INTO: NOT NULL constraint violated for column t1.text2
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
-QUERY = INSERT INTO t1 (text1) VALUES('test1');
-ERROR = !INSERT INTO: NOT NULL constraint violated for column t1.text2
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
-QUERY = INSERT INTO t1 (id, text3) VALUES(1, 'test3');
-ERROR = !INSERT INTO: NOT NULL constraint violated for column t1.text2
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
-QUERY = INSERT INTO t1 (id, text1, text3, text4) VALUES(1, 'test1', 'test3', 
'test4');
-ERROR = !INSERT INTO: NOT NULL constraint violated for column t1.text2
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
-QUERY = INSERT INTO t1 (id, text1, text2, text3, text4) VALUES(1, 'test1', 
'test2', 'test3', NULL);
-ERROR = !INSERT INTO: NOT NULL constraint violated for column t1.text4
+MAPI  = (monetdb) /var/tmp/mtest-8142/.s.monetdb.36261
+QUERY = INSERT INTO t1default (id) VALUES(1);
+
+MAPI  = (monetdb) /var/tmp/mtest-8142/.s.monetdb.36261
+QUERY = INSERT INTO t1default (text1) VALUES('test1');
+
+MAPI  = (monetdb) /var/tmp/mtest-8142/.s.monetdb.36261
+QUERY = INSERT INTO t1default (id, text3) VALUES(1, 'test3');
+
+MAPI  = (monetdb) /var/tmp/mtest-8142/.s.monetdb.36261
+QUERY = INSERT INTO t1default (id, text1, text3, text4) VALUES(1, 'test1', 
'test3', 'test4');
+
+MAPI  = (monetdb) /var/tmp/mtest-8142/.s.monetdb.36261
+QUERY = INSERT INTO t1default (id, text1, text2, text3, text4) VALUES(1, 
'test1', 'test2', 'test3', NULL);
+
+
 
 # 17:34:21 >  
 # 17:34:21 >  Done.
diff --git a/sql/test/Tests/default.stable.out 
b/sql/test/Tests/default.stable.out
--- a/sql/test/Tests/default.stable.out
+++ b/sql/test/Tests/default.stable.out
@@ -39,7 +39,17 @@ Ready.
 [ 1    ]
 [ 1    ]
 [ 1    ]
-% sys.t1,      sys.t1, sys.t1, sys.t1, sys.t1 # table_name
+#select * from t1default;
+% sys.t1default,       sys.t1default,  sys.t1default,  sys.t1default,  
sys.t1default # table_name
+% id,  text1,  text2,  text3,  text4 # name
+% int, varchar,        varchar,        varchar,        varchar # type
+% 1,   5,      5,      5,      5 # length
+[ 1,   "test1",        "test2",        "test3",        "test4" ]
+[ 2,   NULL,   "test2",        "foo",  "foo"   ]
+[ NULL,        NULL,   "test2",        "foo",  "foo"   ]
+#commit;
+#select * from t1default;
+% sys.t1default,       sys.t1default,  sys.t1default,  sys.t1default,  
sys.t1default # table_name
 % id,  text1,  text2,  text3,  text4 # name
 % int, varchar,        varchar,        varchar,        varchar # type
 % 1,   5,      5,      5,      5 # length
diff --git a/sql/test/Tests/marcin1.stable.out 
b/sql/test/Tests/marcin1.stable.out
--- a/sql/test/Tests/marcin1.stable.out
+++ b/sql/test/Tests/marcin1.stable.out
@@ -31,7 +31,9 @@ Ready.
 [ 1    ]
 [ 1    ]
 [ 1    ]
-% sys.t1,      sys.t1, sys.t2, sys.t2 # table_name
+#commit;
+#select * from t1marcin1,t2marcin2 order by t1marcin1.id, t1marcin1.val, 
t2marcin2.id, t2marcin2.val;
+% sys.t1marcin1,       sys.t1marcin1,  sys.t2marcin2,  sys.t2marcin2 # 
table_name
 % id,  val,    id,     val # name
 % int, int,    int,    int # type
 % 1,   1,      1,      1 # length
@@ -50,7 +52,8 @@ Ready.
 [ 5,   5,      1,      3       ]
 [ 5,   5,      2,      2       ]
 [ 5,   5,      3,      1       ]
-% sys.t1,      sys.t2 # table_name
+#select t1marcin1.id,t2marcin2.id from t1marcin1,t2marcin2 where 
t1marcin1.id<>t2marcin2.id;
+% sys.t1marcin1,       sys.t2marcin2 # table_name
 % id,  id # name
 % int, int # type
 % 1,   1 # length
@@ -66,7 +69,8 @@ Ready.
 [ 5,   1       ]
 [ 5,   2       ]
 [ 5,   3       ]
-% sys.t1,      sys.t2 # table_name
+#select t1marcin1.id,t2marcin2.id from t1marcin1,t2marcin2 where 
t1marcin1.id>t2marcin2.id;
+% sys.t1marcin1,       sys.t2marcin2 # table_name
 % id,  id # name
 % int, int # type
 % 1,   1 # length
@@ -79,8 +83,8 @@ Ready.
 [ 5,   1       ]
 [ 5,   2       ]
 [ 5,   3       ]
-#select t1.id, (select t2.id from t2 where t1.id=t2.id) from t1;
-% .t1, .L2 # table_name
+#select t1marcin1.id, (select t2marcin2.id from t2marcin2 where 
t1marcin1.id=t2marcin2.id) from t1marcin1;
+% .t1marcin1,  .L2 # table_name
 % id,  L2 # name
 % int, int # type
 % 1,   1 # length
@@ -89,8 +93,8 @@ Ready.
 [ 3,   3       ]
 [ 4,   NULL    ]
 [ 5,   NULL    ]
-#select t1.id, (select t2.id from t2 where t2.id>2) from t1;
-% sys.t1,      .L2 # table_name
+#select t1marcin1.id, (select t2marcin2.id from t2marcin2 where 
t2marcin2.id>2) from t1marcin1;
+% sys.t1marcin1,       .L2 # table_name
 % id,  L2 # name
 % int, int # type
 % 1,   1 # length
@@ -99,42 +103,48 @@ Ready.
 [ 3,   3       ]
 [ 4,   3       ]
 [ 5,   3       ]
-% sys.t2,      sys.t2, sys.t1, sys.t1 # table_name
+#select * from t2marcin2,t1marcin1 where t1marcin1.id=t2marcin2.id;
+% sys.t2marcin2,       sys.t2marcin2,  sys.t1marcin1,  sys.t1marcin1 # 
table_name
 % id,  val,    id,     val # name
 % int, int,    int,    int # type
 % 1,   1,      1,      1 # length
 [ 1,   3,      1,      1       ]
 [ 2,   2,      2,      2       ]
 [ 3,   1,      3,      3       ]
-% sys.t1,      sys.t1, sys.t2, sys.t2 # table_name
+#select * from t1marcin1,t2marcin2 where t1marcin1.id=t2marcin2.id;
+% sys.t1marcin1,       sys.t1marcin1,  sys.t2marcin2,  sys.t2marcin2 # 
table_name
 % id,  val,    id,     val # name
 % int, int,    int,    int # type
 % 1,   1,      1,      1 # length
 [ 1,   1,      1,      3       ]
 [ 2,   2,      2,      2       ]
 [ 3,   3,      3,      1       ]
-% sys.t2,      sys.t2 # table_name
+#select * from t2marcin2;
+% sys.t2marcin2,       sys.t2marcin2 # table_name
 % id,  val # name
 % int, int # type
 % 1,   1 # length
 [ 1,   3       ]
 [ 2,   2       ]
 [ 3,   1       ]
-% sys.t2,      sys.t2 # table_name
+#select t2marcin2.* from t2marcin2;
+% sys.t2marcin2,       sys.t2marcin2 # table_name
 % id,  val # name
 % int, int # type
 % 1,   1 # length
 [ 1,   3       ]
 [ 2,   2       ]
 [ 3,   1       ]
-% sys.t1,      sys.t1 # table_name
+#select * from t1marcin1 where id>2;
+% sys.t1marcin1,       sys.t1marcin1 # table_name
 % id,  val # name
 % int, int # type
 % 1,   1 # length
 [ 3,   3       ]
 [ 4,   4       ]
 [ 5,   5       ]
-% sys.t1,      sys.t1 # table_name
+#select * from t1marcin1 where id>2 and id<2;
+% sys.t1marcin1,       sys.t1marcin1 # table_name
 % id,  val # name
 % int, int # type
 % 1,   1 # length
diff --git a/sql/test/add_column_with_seq.sql b/sql/test/add_column_with_seq.sql
--- a/sql/test/add_column_with_seq.sql
+++ b/sql/test/add_column_with_seq.sql
@@ -1,14 +1,14 @@
 start transaction;
-create table t3 (name varchar(10));
-insert into t3 values ('a'), ('b'), ('c');
-select * from t3;
+create table t3addcolumn (name varchar(10));
+insert into t3addcolumn values ('a'), ('b'), ('c');
+select * from t3addcolumn;
 
-create table t2 (name varchar(10), seq serial);
-insert into t2 (name) select (name) from t3;
-select * from t2;
+create table t2addcolumn (name varchar(10), seq serial);
+insert into t2addcolumn (name) select (name) from t3addcolumn;
+select * from t2addcolumn;
 
-create table t1 (name varchar(10));
-insert into t1 (name) select (name) from t3;
-alter table t1 add column seq serial;
-select * from t1;
+create table t1addcolumn (name varchar(10));
+insert into t1addcolumn (name) select (name) from t3addcolumn;
+alter table t1addcolumn add column seq serial;
+select * from t1addcolumn;
 rollback;
diff --git a/sql/test/default.sql b/sql/test/default.sql
--- a/sql/test/default.sql
+++ b/sql/test/default.sql
@@ -1,5 +1,5 @@
 START TRANSACTION;
-CREATE TABLE t1 (
+CREATE TABLE t1default (
   id INT,
   text1 VARCHAR(32),
   text2 VARCHAR(32) NOT NULL,
@@ -7,19 +7,20 @@ CREATE TABLE t1 (
   text4 VARCHAR(32) NOT NULL DEFAULT 'foo'
 );
 
-INSERT INTO t1 VALUES(1, 'test1', 'test2', 'test3', 'test4');
-INSERT INTO t1 (id, text2) VALUES(2, 'test2');
-INSERT INTO t1 (text2) VALUES('test2');
+INSERT INTO t1default VALUES(1, 'test1', 'test2', 'test3', 'test4');
+INSERT INTO t1default (id, text2) VALUES(2, 'test2');
+INSERT INTO t1default (text2) VALUES('test2');
 
+select * from t1default;
 commit;
 
 -- next ones should fail
-INSERT INTO t1 (id) VALUES(1);
-INSERT INTO t1 (text1) VALUES('test1');
-INSERT INTO t1 (id, text3) VALUES(1, 'test3');
-INSERT INTO t1 (id, text1, text3, text4) VALUES(1, 'test1', 'test3', 'test4');
-INSERT INTO t1 (id, text1, text2, text3, text4) VALUES(1, 'test1', 'test2', 
'test3', NULL);
+INSERT INTO t1default (id) VALUES(1);
+INSERT INTO t1default (text1) VALUES('test1');
+INSERT INTO t1default (id, text3) VALUES(1, 'test3');
+INSERT INTO t1default (id, text1, text3, text4) VALUES(1, 'test1', 'test3', 
'test4');
+INSERT INTO t1default (id, text1, text2, text3, text4) VALUES(1, 'test1', 
'test2', 'test3', NULL);
 
-select * from t1;
+select * from t1default;
 
-drop table t1;
+drop table t1default;
diff --git a/sql/test/marcin1.sql b/sql/test/marcin1.sql
--- a/sql/test/marcin1.sql
+++ b/sql/test/marcin1.sql
@@ -1,45 +1,45 @@
 start transaction;
-create table t1(id int, val int);
-create table t2(id int, val int);
+create table t1marcin1(id int, val int);
+create table t2marcin2(id int, val int);
 
-insert into t1 values(1,1);
-insert into t1 values(2,2);
-insert into t1 values(3,3);
-insert into t1 values(4,4);
-insert into t1 values(5,5);
-insert into t2 values(1,3);
-insert into t2 values(2,2);
-insert into t2 values(3,1);
+insert into t1marcin1 values(1,1);
+insert into t1marcin1 values(2,2);
+insert into t1marcin1 values(3,3);
+insert into t1marcin1 values(4,4);
+insert into t1marcin1 values(5,5);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to