Changeset: 3a0b19bb5587 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3a0b19bb5587 Modified Files: sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.stable.out sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.out sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out.int128 sql/test/bugs/Tests/aggr_single_value.stable.out sql/test/bugs/Tests/aggr_single_value.stable.out.int128 sql/test/pg_regress/Tests/interval.stable.out sql/test/pg_regress/Tests/interval.stable.out.int128 Branch: queryid2 Log Message:
more test output approved diffs (truncated from 303 to 300 lines): diff --git a/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py b/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py --- a/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py +++ b/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py @@ -1,10 +1,28 @@ import os -from pymonetdb import mapi +import pymonetdb -def open(conn): - conn.connect(database=os.getenv('TSTDB'),username="monetdb",password="monetdb",language="sql",hostname=os.getenv('MAPIHOST'),port=int(os.getenv('MAPIPORT'))) +def connect(): + return pymonetdb.connect(database = os.getenv('TSTDB'), + hostname = '127.0.0.1', + port = int(os.getenv('MAPIPORT')), + username = 'monetdb', + password = 'monetdb', + autocommit = True) -works = """-- some comment +def query(conn, sql, result=False): + cur = conn.cursor() + cur.execute(sql) + r = False + if (result): + r = cur.fetchall() + cur.close() + return r + + +# def open(conn): +# conn.connect(database=os.getenv('TSTDB'),username="monetdb",password="monetdb",language="sql",hostname=os.getenv('MAPIHOST'),port=int(os.getenv('MAPIPORT'))) + +create1 = """-- some comment START TRANSACTION; CREATE TABLE a(i integer); COPY 1 RECORDS INTO a FROM STDIN USING DELIMITERS ',','\\n','"'; @@ -12,7 +30,7 @@ 42 COMMIT; """ -doesnotwork = """-- some comment +create2 = """-- some comment START TRANSACTION; CREATE TABLE b(i integer); COPY 1 RECORDS INTO b FROM STDIN USING DELIMITERS ',','\\n','"'; @@ -24,19 +42,21 @@ 84 COMMIT; """ -cn = mapi.Connection() +cn = connect() +query(cn, create1); +cn.close() -open(cn) -print(cn.cmd('s'+works+';\n')) -cn.disconnect() +cn = connect() +query(cn, create2); +cn.close() -open(cn) -print(cn.cmd('s'+doesnotwork+';\n')) -cn.disconnect() -# this should show a-e, but only shows a -open(cn) -print(cn.cmd('sSELECT name FROM tables WHERE system=0;\n')) -print(cn.cmd('sDROP TABLE a;\n')) +# this should show a-c, but only shows a +cn = connect() +#print() -cn.disconnect() +for x in query(cn, 'SELECT name FROM tables WHERE system=0', True): + print x[0] +query(cn, 'DROP TABLE a') + +cn.close() diff --git a/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.stable.out b/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.stable.out --- a/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.stable.out +++ b/sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.stable.out @@ -17,6 +17,8 @@ stdout of test 'copy-into.Bug-3481` in d # Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-26163/.s.monetdb.33748 # MonetDB/SQL module loaded + + Ready. # SQL catalog created, loading sql scripts once # loading sql script: 09_like.sql @@ -44,35 +46,15 @@ Ready. # loading sql script: 80_udf.sql # loading sql script: 99_system.sql -# 15:05:54 > -# 15:05:54 > "/usr/bin/python2" "copy-into.Bug-3481.SQL.py" "copy-into.Bug-3481" -# 15:05:54 > +# 14:08:38 > +# 14:08:38 > "/usr/local/opt/python/bin/python2.7" "copy-into.Bug-3481.SQL.py" "copy-into.Bug-3481" +# 14:08:38 > -&4 f -&3 -&2 1 -1 -&4 t +a +b +c -&4 f -&3 -&2 1 -1 -&3 -&2 2 -1 -&4 t +# 14:08:39 > +# 14:08:39 > "Done." +# 14:08:39 > -&1 0 3 1 3 -% .tables # table_name -% name # name -% varchar # type -% 1 # length -[ "a" ] -[ "b" ] -[ "c" ] - -&3 - - -# 15:05:54 > -# 15:05:54 > "Done." -# 15:05:54 > - diff --git a/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.out b/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.out --- a/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.out +++ b/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.out @@ -61,25 +61,25 @@ Ready. # 15:17:35 > #select split_part('joeuser@mydatabase','@',1) AS "joeuser"; -% .L1 # table_name +% .L2 # table_name % joeuser # name % char # type % 18 # length [ "joeuser" ] #select split_part('joeuser@mydatabase','@',2) AS "mydatabase"; -% .L1 # table_name +% .L2 # table_name % mydatabase # name % char # type % 18 # length [ "mydatabase" ] #select split_part('joeuser@mydatabase','@',3) AS "empty string"; -% .L1 # table_name -% empty string # name +% .L2 # table_name +% "empty string" # name % char # type % 18 # length [ "" ] #select split_part('','@',3) AS "error"; -% .L1 # table_name +% .L2 # table_name % error # name % char # type % 0 # length @@ -101,8 +101,8 @@ Ready. [ "a@@@b" ] [ "@@b" ] #select split_part(a,'@',1), split_part(a,'@',2) from somestrings; -% sys.L1, sys.L2 # table_name -% L1, L2 # name +% sys.L2, sys.L4 # table_name +% L2, L4 # name % varchar, varchar # type % 7, 10 # length [ "", "" ] diff --git a/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out b/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out --- a/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out +++ b/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out @@ -32,13 +32,13 @@ Ready. % sys.L2 # table_name % L1 # name % bigint # type -% 20 # length +% 1 # length [ NULL ] #SELECT MIN(a) FROM casebug; % sys.L2 # table_name % L1 # name % int # type -% 11 # length +% 1 # length [ NULL ] #SELECT COALESCE(MIN(a), 0) FROM casebug; % sys.L2 # table_name diff --git a/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out.int128 b/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out.int128 --- a/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out.int128 +++ b/sql/test/BugTracker/Tests/case_with_aggr.SF-1876779.stable.out.int128 @@ -32,13 +32,13 @@ Ready. % sys.L4 # table_name % L3 # name % hugeint # type -% 40 # length +% 1 # length [ NULL ] #SELECT MIN(a) FROM casebug; % sys.L4 # table_name % L3 # name % int # type -% 11 # length +% 1 # length [ NULL ] #SELECT COALESCE(MIN(a), 0) FROM casebug; % sys.L4 # table_name diff --git a/sql/test/bugs/Tests/aggr_single_value.stable.out b/sql/test/bugs/Tests/aggr_single_value.stable.out --- a/sql/test/bugs/Tests/aggr_single_value.stable.out +++ b/sql/test/bugs/Tests/aggr_single_value.stable.out @@ -63,7 +63,7 @@ Ready. % .L2 # table_name % L2 # name % bigint # type -% 20 # length +% 1 # length [ NULL ] #SELECT max(1); % .L1 # table_name @@ -75,7 +75,7 @@ Ready. % .L2 # table_name % L2 # name % int # type -% 11 # length +% 1 # length [ NULL ] #SELECT min(1); % .L1 # table_name @@ -87,7 +87,7 @@ Ready. % .L2 # table_name % L2 # name % int # type -% 11 # length +% 1 # length [ NULL ] # 19:26:22 > diff --git a/sql/test/bugs/Tests/aggr_single_value.stable.out.int128 b/sql/test/bugs/Tests/aggr_single_value.stable.out.int128 --- a/sql/test/bugs/Tests/aggr_single_value.stable.out.int128 +++ b/sql/test/bugs/Tests/aggr_single_value.stable.out.int128 @@ -63,7 +63,7 @@ Ready. % .L5 # table_name % L4 # name % hugeint # type -% 40 # length +% 1 # length [ NULL ] #SELECT max(1); % .L4 # table_name @@ -75,7 +75,7 @@ Ready. % .L5 # table_name % L4 # name % int # type -% 11 # length +% 1 # length [ NULL ] #SELECT min(1); % .L4 # table_name @@ -87,7 +87,7 @@ Ready. % .L5 # table_name % L4 # name % int # type -% 11 # length +% 1 # length [ NULL ] # 19:26:22 > diff --git a/sql/test/pg_regress/Tests/interval.stable.out b/sql/test/pg_regress/Tests/interval.stable.out --- a/sql/test/pg_regress/Tests/interval.stable.out +++ b/sql/test/pg_regress/Tests/interval.stable.out @@ -27,7 +27,7 @@ Ready. #SELECT cast('-05' as interval second) AS "Five hours"; % .L3 # table_name -% Five hours # name +% "Five hours" # name % sec_interval # type % 6 # length [ -5.000 ] diff --git a/sql/test/pg_regress/Tests/interval.stable.out.int128 b/sql/test/pg_regress/Tests/interval.stable.out.int128 --- a/sql/test/pg_regress/Tests/interval.stable.out.int128 +++ b/sql/test/pg_regress/Tests/interval.stable.out.int128 @@ -27,7 +27,7 @@ Ready. #SELECT cast('-05' as interval second) AS "Five hours"; % .L3 # table_name -% Five hours # name +% "Five hours" # name _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list