Changeset: 58ba9e3940e6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=58ba9e3940e6 Modified Files: clients/perl/Tests/DBD-bug-2889.pl.in clients/perl/Tests/Makefile.ag sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.bat sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.sh sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.err sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.out Branch: Aug2011 Log Message:
add test for bug #2889 Thanks R?my Chibois for his initial test snippet diffs (220 lines): diff --git a/clients/perl/Tests/DBD-bug-2889.pl.in b/clients/perl/Tests/DBD-bug-2889.pl.in new file mode 100755 --- /dev/null +++ b/clients/perl/Tests/DBD-bug-2889.pl.in @@ -0,0 +1,70 @@ +#!@PERL@ + +# The contents of this file are subject to the MonetDB Public License +# Version 1.1 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.monetdb.org/Legal/MonetDBLicense +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +# License for the specific language governing rights and limitations +# under the License. +# +# The Original Code is the MonetDB Database System. +# +# The Initial Developer of the Original Code is CWI. +# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. +# Copyright August 2008-2011 MonetDB B.V. +# All Rights Reserved. + +use strict; +use warnings; + +$|++; + +use DBI(); + +my $dsn = "dbi:monetdb:database=$ARGV[1];host=localhost;port=$ARGV[0]"; +my $dbh = DBI->connect( + $dsn, 'monetdb', 'monetdb' +); + +my $query = qq{ +SELECT + name +FROM + functions +UNION ALL +SELECT + name +FROM + functions +UNION ALL +SELECT + name +FROM + functions +UNION ALL +SELECT + name +FROM + functions +UNION ALL +SELECT + name +FROM + functions +; +}; + +my $sth = $dbh->prepare($query); +$sth->execute; + +# Here we tell DBI to fetch at most 1000 lines (out of ~5000 available) +my $r = $sth->fetchall_arrayref(undef, 1000); + +# Print "200 rows" in my case, should print "1000 rows" +print scalar(@{$r}) . " rows\n"; + +$dbh->disconnect(); + diff --git a/clients/perl/Tests/Makefile.ag b/clients/perl/Tests/Makefile.ag --- a/clients/perl/Tests/Makefile.ag +++ b/clients/perl/Tests/Makefile.ag @@ -20,7 +20,7 @@ MTSAFE scripts_pl = { COND = HAVE_TESTING DIR = bindir - SOURCES = sqlsample.pl.in malsample.pl.in + SOURCES = sqlsample.pl.in malsample.pl.in DBD-bug-2889.pl.in } EXTRA_DIST = client.pl smack00.pl smack01.pl diff --git a/sql/test/mapi/Tests/perl_dbi.SQL.bat b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.bat copy from sql/test/mapi/Tests/perl_dbi.SQL.bat copy to sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.bat --- a/sql/test/mapi/Tests/perl_dbi.SQL.bat +++ b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.bat @@ -3,4 +3,4 @@ prompt # $t $g echo on -sqlsample.pl %MAPIPORT% %TSTDB% +DBD-bug-2889.pl %MAPIPORT% %TSTDB% diff --git a/sql/test/mapi/Tests/perl_dbi.SQL.sh b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.sh copy from sql/test/mapi/Tests/perl_dbi.SQL.sh copy to sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.sh --- a/sql/test/mapi/Tests/perl_dbi.SQL.sh +++ b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.SQL.sh @@ -1,3 +1,3 @@ #!/bin/sh -Mlog -x "sqlsample.pl $MAPIPORT $TSTDB" +Mlog -x "DBD-bug-2889.pl $MAPIPORT $TSTDB" diff --git a/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.err b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.err @@ -0,0 +1,42 @@ +stderr of test 'DBD-manyrows.Bug-2889` in directory 'test/BugTracker-2011` itself: + + +# 16:17:35 > +# 16:17:35 > mserver5 --debug=10 --set gdk_nr_threads=0 --set "gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Aug2011-volund.ins.cwi.nl/sql/dbfarm" --set mapi_open=true --set mapi_port=39984 --set monet_prompt= --trace --forcemito --set mal_listing=2 "--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 ; echo ; echo Over.. +# 16:17:35 > + +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = /ufs/fabian/scratch/monetdb/Aug2011/program-x86_64/var/lib/monetdb5/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# builtin opt gdk_vmtrim = yes +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt gdk_dbfarm = /net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Aug2011-volund.ins.cwi.nl/sql/dbfarm +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 39984 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbname = mTests_test_BugTracker-2011 +# cmdline opt mal_listing = 0 + +# 16:17:35 > +# 16:17:35 > ./DBD-manyrows.Bug-2889.SQL.sh DBD-manyrows.Bug-2889 +# 16:17:35 > + + +# 16:17:35 > +# 16:17:35 > DBD-bug-2889.pl 39984 mTests_test_BugTracker-2011 +# 16:17:35 > + + +# 16:17:38 > +# 16:17:38 > Done. +# 16:17:38 > + diff --git a/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.out b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/DBD-manyrows.Bug-2889.stable.out @@ -0,0 +1,60 @@ +stdout of test 'DBD-manyrows.Bug-2889` in directory 'test/BugTracker-2011` itself: + + +# 16:17:35 > +# 16:17:35 > mserver5 --debug=10 --set gdk_nr_threads=0 --set "gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Aug2011-volund.ins.cwi.nl/sql/dbfarm" --set mapi_open=true --set mapi_port=39984 --set monet_prompt= --trace --forcemito --set mal_listing=2 "--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 ; echo ; echo Over.. +# 16:17:35 > + +# MonetDB 5 server v11.5.2 "Aug2011-51ef304025ea" +# Serving database 'mTests_test_BugTracker-2011', using 4 threads +# Compiled for x86_64-pc-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 7.749 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2011 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://volund.ins.cwi.nl:39984/ +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +# MonetDB/DataCell module not loaded +# SQLException:mvc:SQL module not initialized + +Ready. +# SQL catalog created, loading sql scripts once +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/10_math.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/11_times.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/12_url.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/13_date.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/14_inet.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/15_history.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/16_tracelog.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/17_compress.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/18_dictionary.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/19_cluster.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/20_vacuum.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/21_dependency_functions.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/22_clients.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/23_skyserver.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/24_zorder.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/25_debug.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/40_geom.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/50_datacell.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/80_udf.sql +# SQL loading sql scripts /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/program-x86_64/lib/monetdb5/createdb/99_system.sql + +Over.. + +# 16:17:35 > +# 16:17:35 > ./DBD-manyrows.Bug-2889.SQL.sh DBD-manyrows.Bug-2889 +# 16:17:35 > + + +# 16:17:35 > +# 16:17:35 > DBD-bug-2889.pl 39984 mTests_test_BugTracker-2011 +# 16:17:35 > + +1000 rows + +# 16:17:38 > +# 16:17:38 > Done. +# 16:17:38 > + _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
