Changeset: 536255410444 for monetdb-perl
URL: https://dev.monetdb.org/hg/monetdb-perl?cmd=changeset;node=536255410444
Modified Files:
        DBD/t/15many.t
Branch: default
Log Message:

Test fetchrow_array


diffs (32 lines):

diff --git a/DBD/t/15many.t b/DBD/t/15many.t
--- a/DBD/t/15many.t
+++ b/DBD/t/15many.t
@@ -16,7 +16,7 @@ use DBD_TEST();
 use Test::More;
 
 if (defined $ENV{DBI_DSN}) {
-  plan tests => 4;
+  plan tests => 5;
 } else {
   plan skip_all => 'Cannot test without DB info';
 }
@@ -44,7 +44,17 @@ ok($count == 1000, 'got 1000 rows as req
 $count = scalar(@{$r});
 ok($count % 1000 == 0, "got $count rows");
 
-
-
+# fetch some data using fetchrow_array
+# fetch a lot of rows and see we don't get disconnected halfway, see Bug 2897
+$query = qq{
+       SELECT value as i, value as j, value as k FROM 
sys.generate_series(0,100);
+};
+$sth = $dbh->prepare($query);
+$sth->execute;
+my $cells = 0;
+while (my @row = $sth->fetchrow_array) {
+       $cells += 1 + $#row;
+}
+is($cells, 300, 'fetch items using fetchrow_array');
 
 ok( $dbh->disconnect,'Disconnect');
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to