This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id:
123386
Status:
stalled
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
rahul.gojame [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
Critical
Broken in:
(no value)
Fixed in:
(no value)



Subject: primary_key_info() not working with TeraData ODBC version >= 15.10
Hi, $dbh->primary_key_info( undef, $schema, $tbl ) or $dbh->func(undef, $schema, $tbl, "GetPrimaryKeys"); is not working for TeraData 15.10 and above. Scripts: Create table: CREATE MULTISET TABLE pw_clean.Test_PRIMARY_KEY ,FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, FREESPACE = 10 PERCENT, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO ( MAP_TID VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL, CREATE_DTM TIMESTAMP(6) NOT NULL, UPDATE_DTM TIMESTAMP(6) NOT NULL) UNIQUE PRIMARY INDEX PK_Test_PRIMARY_KEY ( MAP_TID ); PER SCRIPT TO GET DATA: my $db_conn_str = "dbi:ODBC:driver=\{Teradata\}; DBCName=$db_instance; database=$db_schema; uid=$db_user; pwd=$db_pass"; my $dbh = DBI->connect($db_conn_str, $db_user, $db_pass, { AutoCommit => 1, PrintError => 0, RaiseError => 0 }) ; my $sth = $dbh->primary_key_info( undef, $schema, $tbl ) ; unless ( $sth ) { die "Error: getting Statement handle for primary_key_info Schema:$schema Tbl:$tbl\n"; } while ( my @row = $sth->fetchrow_array() ) { print "PK ROW [ @row ] and row[3]:$row[3]\n"; last; # for testing } print "==========finish====\n";
On Thu Oct 26 03:40:51 2017, rahul.gojame@gmail.com wrote:
Show quoted text
> Hi, > > $dbh->primary_key_info( undef, $schema, $tbl ) or > $dbh->func(undef, $schema, $tbl, "GetPrimaryKeys"); > > is not working for TeraData 15.10 and above. > > Scripts: > Create table: > CREATE MULTISET TABLE pw_clean.Test_PRIMARY_KEY ,FALLBACK , > NO BEFORE JOURNAL, > NO AFTER JOURNAL, > FREESPACE = 10 PERCENT, > CHECKSUM = DEFAULT, > DEFAULT MERGEBLOCKRATIO > ( > MAP_TID VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC NOT > NULL, > CREATE_DTM TIMESTAMP(6) NOT NULL, > UPDATE_DTM TIMESTAMP(6) NOT NULL) > UNIQUE PRIMARY INDEX PK_Test_PRIMARY_KEY ( MAP_TID ); > > PER SCRIPT TO GET DATA: > my $db_conn_str = "dbi:ODBC:driver=\{Teradata\}; > DBCName=$db_instance; > database=$db_schema; > uid=$db_user; > pwd=$db_pass"; > > my $dbh = DBI->connect($db_conn_str, $db_user, $db_pass, { > AutoCommit => 1, > PrintError => 0, > RaiseError => 0 > }) ; > > my $sth = $dbh->primary_key_info( undef, $schema, $tbl ) ; > > unless ( $sth ) { die "Error: getting Statement handle for > primary_key_info Schema:$schema Tbl:$tbl\n"; } > > while ( my @row = $sth->fetchrow_array() ) { > print "PK ROW [ @row ] and row[3]:$row[3]\n"; > last; # for testing > } > > print "==========finish====\n";
Are you saying it worked before 15.10? In what way does it fail? I have not got teradata so can you run your test script with debug output turned on and send it to me please? To do this: export DBI_TRACE=15=dbitrace.log perl my_test_script.pl Martin -- Martin J. Evans Wetherby, UK


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.