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

Teiid ODBC compatibility with perl-DBD-Pg for postgresql is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.5
    • 8.5
    • ODBC
    • None

    Description

      Hi,

      We are testing the git head of teiid 8.5 in JBoss EAP 6.1, running with java 7, and are attempting to connect to teiid using perl-DBD-Pg.

      We have a code snippet that looks like

      #! /usr/bin/perl
      
      use strict;
      use warnings;
      use DBI;
      
      my $db_type = 'Pg';
      my $db_name = 'TestZipVDB';
      my $db_host = 'teiid.host';
      my $db_port = 5432;
      my $user = 'teiid';
      my $pass = 'teiid';
      my $attr = { AutoCommit => 0, RaiseError => 1 };
      
      my $dsn = sprintf( "dbi:%s:dbname=%s;host=%s;port=%s;sslmode=prefer",
          $db_type, $db_name, $db_host, $db_port );
      
      my $dbh = DBI->connect( $dsn, $user, $pass, $attr );
      
      my $query = <<QUERY;
      select count(1) from bugzilla.bugs
      QUERY
      
      my $sth = $dbh->prepare($query);
      $sth->execute();
      
      while ( my @row = $sth->fetchrow_array() ) {
          print join( ',', map {"\"$_\""} @row ) . "\n";
      }
      
      $sth->finish();
      $dbh->disconnect();
      

      However when running this with ssl turned on or off we get the following error

      DBD::Pg::st execute failed: unexpected response from server; first received character was "s" at ./a.pl line 25.
      DBD::Pg::st execute failed: unexpected response from server; first received character was "s" at ./a.pl line 25.
      Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=TestZipVDB;host=teiid.host;port=5432 at ./a.pl line 25.
      

      It seems that ODBC/Pg Compatibility was broken with a recent commit?

      We git this error on a RHEL-6 box running postgresql 8.4 and on Fedora 19 running postgresql 9.2

      Regards,

      Graeme

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: