Changeset: dfce131ff0fc for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dfce131ff0fc Modified Files: sql/test/pg_regress/Tests/All sql/test/pg_regress/Tests/char.stable.err sql/test/pg_regress/Tests/char.stable.out sql/test/pg_regress/Tests/load.SQL.bat sql/test/pg_regress/Tests/load.SQL.sh sql/test/pg_regress/Tests/strings_cast.stable.err sql/test/pg_regress/Tests/strings_cast.stable.out sql/test/pg_regress/Tests/strings_concat.stable.err sql/test/pg_regress/Tests/strings_concat.stable.out sql/test/pg_regress/Tests/strings_like.stable.out sql/test/pg_regress/Tests/text.stable.err sql/test/pg_regress/Tests/text.stable.out sql/test/pg_regress/Tests/varchar.stable.err sql/test/pg_regress/Tests/varchar.stable.out Branch: default Log Message:
pg_regress: restore existing tests as in Jan2014 executed: for i in `hg cat -r Jan2014 sql/test/pg_regress/Tests/All | grep '^[^#]'` ; do echo $i ; sed -i -e "s|^$i$|##$i|" -e "s|^#$i$|$i|" sql/test/pg_regress/Tests/All; done for i in `hg cat -r Jan2014 sql/test/pg_regress/Tests/All | grep '^[^#]'` ; do echo $i ; for j in `hg locate -I sql/test/pg_regress/Tests/$i.stable.\*` ; do echo $j ; hg cat -r Jan2014 $j > $j ; done ; done sed -i 's|%SQL_CLIENT% < "create_table.sql"|%SQL_CLIENT% < "%TSTSRCDIR%/create_table.sql"|' sql/test/pg_regress/Tests/load.SQL.bat sed -i 's|Mlog -x "$SQL_CLIENT < create_table.sql"|Mlog -x "$SQL_CLIENT < $TSTSRCDIR/create_table.sql"|' sql/test/pg_regress/Tests/load.SQL.sh diffs (truncated from 1097 to 300 lines): diff --git a/sql/test/pg_regress/Tests/All b/sql/test/pg_regress/Tests/All --- a/sql/test/pg_regress/Tests/All +++ b/sql/test/pg_regress/Tests/All @@ -1,14 +1,14 @@ -#load -# -## these need to go here, later tests depend on their tables to exist -#char -#varchar -#text -# -#strings_concat -#strings_cast -#strings_like -# +load + +# these need to go here, later tests depend on their tables to exist +char +varchar +text + +strings_concat +strings_cast +strings_like + #pgregress set # abstime NOT supported ABSTIME, deprecated in Postgresql aggregates @@ -19,7 +19,7 @@ boolean box btree_index case -char +##char circle cluster comments @@ -86,13 +86,13 @@ select_views sequence sql_ascii stats -strings_cast -strings_concat -strings_like +##strings_cast +##strings_concat +##strings_like strings subselect temp -text +##text time timestamp timestamptz @@ -105,5 +105,5 @@ type_sanity union update vacuum -varchar +##varchar without_oid diff --git a/sql/test/pg_regress/Tests/char.stable.err b/sql/test/pg_regress/Tests/char.stable.err --- a/sql/test/pg_regress/Tests/char.stable.err +++ b/sql/test/pg_regress/Tests/char.stable.err @@ -65,17 +65,32 @@ stderr of test 'char` in directory 'sql/ #warning: please don't forget to set your vault key! #(see /export/scratch/stripe/fabian/monetdb/current/program-i86pc/etc/monetdb5.conf) -# 17:09:57 > -# 17:09:57 > "./char.SQL.sh" "char" -# 17:09:57 > +# 22:08:26 > +# 22:08:26 > ./char.SQL.sh char +# 22:08:26 > -# 17:09:57 > -# 17:09:57 > Mtimeout -timeout 60 mclient -lsql -ftest -Eutf-8 -i -e --host=/var/tmp/mtest-1142 --port=38959 -e < /ufs/dinther/dev/dev/sql/test/pg_regress/Tests/../monetdb/char.sql -# 17:09:57 > +# 22:08:26 > +# 22:08:26 > Mtimeout -timeout 60 mclient -lsql -umonetdb -Pmonetdb --host=pegasus --port=38104 -e < ../../../../../../../../../../mirror/fabian/monetdb/current/sql/src/test/pg_regress/Tests/../monetdb/char.sql +# 22:08:26 > +MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 +QUERY = SELECT char 'c' = char 'c' AS true; +ERROR = !syntax error, unexpected CHARACTER in: "select char" +MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 +QUERY = INSERT INTO CHAR_TBL (f1) VALUES ('cd'); +ERROR = !value too long for type (var)char(1) +MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 +QUERY = INSERT INTO CHAR_TBL (f1) VALUES ('c '); +ERROR = !value too long for type (var)char(1) +MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 +QUERY = INSERT INTO CHAR_TBL (f1) VALUES ('abcde'); +ERROR = !value too long for type (var)char(4) +MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 +QUERY = INSERT INTO CHAR_TBL (f1) VALUES ('abcd '); +ERROR = !value too long for type (var)char(4) -# 17:09:57 > -# 17:09:57 > "Done." -# 17:09:57 > +# 22:08:26 > +# 22:08:26 > Done. +# 22:08:26 > diff --git a/sql/test/pg_regress/Tests/char.stable.out b/sql/test/pg_regress/Tests/char.stable.out --- a/sql/test/pg_regress/Tests/char.stable.out +++ b/sql/test/pg_regress/Tests/char.stable.out @@ -15,18 +15,132 @@ stdout of test 'char` in directory 'sql/ # MonetDB/SQL module v2.31.0 loaded Ready. +#function user.main():void; +# clients.quit(); +#end main; -# 17:09:57 > -# 17:09:57 > "./char.SQL.sh" "char" -# 17:09:57 > +# 22:08:26 > +# 22:08:26 > ./char.SQL.sh char +# 22:08:26 > -# 17:09:57 > -# 17:09:57 > Mtimeout -timeout 60 mclient -lsql -ftest -Eutf-8 -i -e --host=/var/tmp/mtest-1142 --port=38959 -e < /ufs/dinther/dev/dev/sql/test/pg_regress/Tests/../monetdb/char.sql -# 17:09:57 > +# 22:08:26 > +# 22:08:26 > Mtimeout -timeout 60 mclient -lsql -umonetdb -Pmonetdb --host=pegasus --port=38104 -e < ../../../../../../../../../../mirror/fabian/monetdb/current/sql/src/test/pg_regress/Tests/../monetdb/char.sql +# 22:08:26 > -# 17:09:57 > -# 17:09:57 > "Done." -# 17:09:57 > +#-- +#-- CHAR +#-- +#-- fixed-length by value +#-- internally passed by value if <= 4 bytes in storage +#SELECT char 'c' = char 'c' AS true; +#-- +#-- Build a table for testing +#-- +#CREATE TABLE CHAR_TBL(f1 char); +[ 1 ] +[ 1 ] +#-- any of the following three input formats are acceptable +[ 1 ] +[ 1 ] +[ 1 ] +#-- zero-length char +[ 1 ] +#-- try char's of greater than 1 length +#INSERT INTO CHAR_TBL (f1) VALUES ('cd'); +#INSERT INTO CHAR_TBL (f1) VALUES ('c '); +#SELECT '' AS seven, CHAR_TBL.* FROM CHAR_TBL; +% .L, sys.char_tbl # table_name +% seven, f1 # name +% char, char # type +% 0, 1 # length +[ "", "a" ] +[ "", "A" ] +[ "", "1" ] +[ "", "2" ] +[ "", "3" ] +[ "", "" ] +#SELECT '' AS six, c.* +# FROM CHAR_TBL c +# WHERE c.f1 <> 'a'; +% .L, sys.c # table_name +% six, f1 # name +% char, char # type +% 0, 1 # length +[ "", "A" ] +[ "", "1" ] +[ "", "2" ] +[ "", "3" ] +[ "", "" ] +#SELECT '' AS one, c.* +# FROM CHAR_TBL c +# WHERE c.f1 = 'a'; +% .L, sys.c # table_name +% one, f1 # name +% char, char # type +% 0, 1 # length +[ "", "a" ] +#SELECT '' AS five, c.* +# FROM CHAR_TBL c +# WHERE c.f1 < 'a'; +% .L, sys.c # table_name +% five, f1 # name +% char, char # type +% 0, 1 # length +[ "", "A" ] +[ "", "1" ] +[ "", "2" ] +[ "", "3" ] +[ "", "" ] +#SELECT '' AS six, c.* +# FROM CHAR_TBL c +# WHERE c.f1 <= 'a'; +% .L, sys.c # table_name +% six, f1 # name +% char, char # type +% 0, 1 # length +[ "", "a" ] +[ "", "A" ] +[ "", "1" ] +[ "", "2" ] +[ "", "3" ] +[ "", "" ] +#SELECT '' AS one, c.* +# FROM CHAR_TBL c +# WHERE c.f1 > 'a'; +% .L, sys.c # table_name +% one, f1 # name +% char, char # type +% 0, 1 # length +#SELECT '' AS two, c.* +# FROM CHAR_TBL c +# WHERE c.f1 >= 'a'; +% .L, sys.c # table_name +% two, f1 # name +% char, char # type +% 0, 1 # length +[ "", "a" ] +#DROP TABLE CHAR_TBL; +#-- +#-- Now test longer arrays of char +#-- +#CREATE TABLE CHAR_TBL(f1 char(4)); +[ 1 ] +[ 1 ] +[ 1 ] +#INSERT INTO CHAR_TBL (f1) VALUES ('abcde'); +#INSERT INTO CHAR_TBL (f1) VALUES ('abcd '); +#SELECT '' AS four, CHAR_TBL.* FROM CHAR_TBL; +% .L, sys.char_tbl # table_name +% four, f1 # name +% char, char # type +% 0, 4 # length +[ "", "a" ] +[ "", "ab" ] +[ "", "abcd" ] +# 22:08:26 > +# 22:08:26 > Done. +# 22:08:26 > + diff --git a/sql/test/pg_regress/Tests/load.SQL.bat b/sql/test/pg_regress/Tests/load.SQL.bat --- a/sql/test/pg_regress/Tests/load.SQL.bat +++ b/sql/test/pg_regress/Tests/load.SQL.bat @@ -1,7 +1,7 @@ @prompt # $t $g @echo on -%SQL_CLIENT% < "create_table.sql" +%SQL_CLIENT% < "%TSTSRCDIR%/create_table.sql" %SQL_CLIENT% < "%TSTTRGDIR%/load.copy.source" diff --git a/sql/test/pg_regress/Tests/load.SQL.sh b/sql/test/pg_regress/Tests/load.SQL.sh --- a/sql/test/pg_regress/Tests/load.SQL.sh +++ b/sql/test/pg_regress/Tests/load.SQL.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -Mlog -x "$SQL_CLIENT < create_table.sql" +Mlog -x "$SQL_CLIENT < $TSTSRCDIR/create_table.sql" Mlog "loading data with sed-foo" diff --git a/sql/test/pg_regress/Tests/strings_cast.stable.err b/sql/test/pg_regress/Tests/strings_cast.stable.err --- a/sql/test/pg_regress/Tests/strings_cast.stable.err +++ b/sql/test/pg_regress/Tests/strings_cast.stable.err @@ -65,17 +65,37 @@ stderr of test 'strings_cast` in directo #warning: please don't forget to set your vault key! #(see /export/scratch/stripe/fabian/monetdb/current/program-i86pc/etc/monetdb5.conf) -# 17:11:31 > -# 17:11:31 > "./strings_cast.SQL.sh" "strings_cast" -# 17:11:31 > +# 22:34:06 > +# 22:34:06 > ./strings_cast.SQL.sh strings_cast +# 22:34:06 > -# 17:11:31 > -# 17:11:31 > Mtimeout -timeout 60 mclient -lsql -ftest -Eutf-8 -i -e --host=/var/tmp/mtest-1142 --port=38959 -e < /ufs/dinther/dev/dev/sql/test/pg_regress/Tests/../monetdb/strings_cast.sql -# 17:11:31 > +# 19:52:32 > +# 19:52:32 > Mtimeout -timeout 60 mclient -lsql -ftest -Eutf-8 -i -e --host=/var/tmp/mtest-15695 --port=36739 -e < /home/niels/data/rc/clean/sql/test/pg_regress/Tests/../monetdb/strings_cast.sql +# 19:52:32 > +MAPI = (monetdb) /var/tmp/mtest-15695/.s.monetdb.36739 +QUERY = SELECT CAST(f1 AS text) AS "text(char)" FROM CHAR_TBL; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list