Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-1830

Perl client using DBD:Pg hangs with resultset > 512 rows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.6
    • 7.4.1
    • ODBC
    • None

      We are using a simple perl script to connect to teiid and run a query, spitting out the results. Unfortunately we find that the perl client hangs forever when trying to execture/return a resultset > 512 rows, but 512 or less it runs fine

      The code for a test script is as follows

      #! /usr/bin/perl
      
      use strict;
      use warnings;
      use DBI;
      
      
      
      my $db_type = 'Pg';
      my $db_name = 'EngVDBF';
      my $db_host = 'vdb.engineering.redhat.com';
      my $db_port = 35432;
      my $user = 'teiid';
      my $pass = 'teiid';
      my $attr = { AutoCommit => 0, RaiseError => 1 };
      
      my $dsn = sprintf( "dbi:%s:dbname=%s;host=%s;port=%s",
          $db_type, $db_name, $db_host, $db_port );
      
      my $dbh = DBI->connect( $dsn, $user, $pass, $attr );
      
      my $limit = ( $ARGV[0] ) ? "limit $ARGV[0]" : "";
      
      my $query = <<QUERY;
          select bugs.bug_id, bugs.priority, bugs.bug_severity
            from BugzillaS.bugs bugs $limit
      QUERY
      
      my $sth = $dbh->prepare($query);
      $sth->execute();
      
      while ( my @row = $sth->fetchrow_array() ) {
          print join( ',', map {"\"$_\""} @row ) . "\n";
      }
      
      $sth->finish();
      $dbh->disconnect();
      

      When running

      ./teiid.pl 512
      

      Query runs fine, when we run

      ./teiid.pl 513
      

      Client just sits there forever (the query actually has about 1800 odd rows returning).

            rhn-engineering-shawkins Steven Hawkins
            graeme.gillies Graeme Gillies (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: