Hello community,

here is the log from the commit of package perl-DBD-ODBC for openSUSE:Factory 
checked in at 2018-03-07 10:34:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DBD-ODBC (Old)
 and      /work/SRC/openSUSE:Factory/.perl-DBD-ODBC.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-DBD-ODBC"

Wed Mar  7 10:34:35 2018 rev:41 rq:582479 version:1.57

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-DBD-ODBC/perl-DBD-ODBC.changes      
2016-11-04 20:59:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-DBD-ODBC.new/perl-DBD-ODBC.changes 
2018-03-07 10:34:38.558554255 +0100
@@ -1,0 +2,6 @@
+Fri Mar  2 06:11:26 UTC 2018 - co...@suse.com
+
+- updated to 1.57
+   see /usr/share/doc/packages/perl-DBD-ODBC/Changes
+
+-------------------------------------------------------------------

Old:
----
  DBD-ODBC-1.56.tar.gz

New:
----
  DBD-ODBC-1.57.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-DBD-ODBC.spec ++++++
--- /var/tmp/diff_new_pack.INn7HG/_old  2018-03-07 10:34:39.090535066 +0100
+++ /var/tmp/diff_new_pack.INn7HG/_new  2018-03-07 10:34:39.094534921 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-DBD-ODBC
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           perl-DBD-ODBC
-Version:        1.56
+Version:        1.57
 Release:        0
 %define cpan_name DBD-ODBC
 Summary:        ODBC Driver for DBI
-License:        Artistic-1.0 or GPL-1.0+
+License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/DBD-ODBC/
-Source0:        
http://www.cpan.org/authors/id/M/MJ/MJEVANS/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/M/MJ/MJEVANS/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 Patch0:         perl-DBD-ODBC-1.29-Makefile.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ DBD-ODBC-1.56.tar.gz -> DBD-ODBC-1.57.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/META.yml new/DBD-ODBC-1.57/META.yml
--- old/DBD-ODBC-1.56/META.yml  2016-10-06 10:30:31.000000000 +0200
+++ new/DBD-ODBC-1.57/META.yml  2018-03-01 09:25:39.000000000 +0100
@@ -1,7 +1,7 @@
 #--- #YAML:1.0
 name: DBD-ODBC
 abstract: ODBC DBD for Perl DBI
-version: 1.56
+version: 1.57
 version_from: ODBC.pm
 author:
   - Martin J. Evans <mjev...@cpan.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/Makefile.PL 
new/DBD-ODBC-1.57/Makefile.PL
--- old/DBD-ODBC-1.56/Makefile.PL       2013-12-17 10:40:52.000000000 +0100
+++ new/DBD-ODBC-1.57/Makefile.PL       2018-03-01 09:24:26.000000000 +0100
@@ -39,7 +39,7 @@
 {
     # some useful info when debugging problems
     print "OSNAME: $OSNAME\n";
-    my @envs = qw(LANG ODBCHOME LD_LIBRARY_PATH DBROOT WINDIR II_SYSTEM);
+    my @envs = qw(LANG ODBCHOME LD_LIBRARY_PATH DBROOT WINDIR II_SYSTEM 
DBD_ODBC_UNICODE);
     foreach (@envs) {
         print "$_: ", ($ENV{$_} ? $ENV{$_} : ''), "\n";
     }
@@ -167,6 +167,8 @@
 my $opt_x = undef;              # prefer unixODBC over iODBC
 my $opt_w = undef;              # enable -Wall (gcc only)
 
+$opt_u = 1 if $ENV{DBD_ODBC_UNICODE};
+
 my @options = ("g!" => \$opt_g,
                "o=s" => \$opt_o,
                "u!" => \$opt_u,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/ODBC.pm new/DBD-ODBC-1.57/ODBC.pm
--- old/DBD-ODBC-1.56/ODBC.pm   2016-10-06 10:30:24.000000000 +0200
+++ new/DBD-ODBC-1.57/ODBC.pm   2018-03-01 09:26:16.000000000 +0100
@@ -18,7 +18,7 @@
 # see discussion on dbi-users at
 # http://www.nntp.perl.org/group/perl.dbi.dev/2010/07/msg6096.html and
 # http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/
-$DBD::ODBC::VERSION = '1.56';
+$DBD::ODBC::VERSION = '1.57';
 
 {
     ## no critic (ProhibitMagicNumbers ProhibitExplicitISA)
@@ -671,7 +671,7 @@
 
 =head1 VERSION
 
-This documentation refers to DBD::ODBC version 1.56.
+This documentation refers to DBD::ODBC version 1.57.
 
 
 =head1 WARNING
@@ -1251,6 +1251,12 @@
 you need to specify the -u argument to Makefile.PL. Please bear in mind
 that some ODBC drivers do not support SQL_Wxxx columns or parameters.
 
+You can also specify that you want UNICODE support by setting the
+C<DBD_ODBC_UNICODE> environment variable prior to install:
+
+  export DBD_ODBC_UNICODE=1
+  cpanm DBD::ODBC
+
 UNICODE support in ODBC Drivers differs considerably. Please read the
 README.unicode file for further details.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/ODBC.xs new/DBD-ODBC-1.57/ODBC.xs
--- old/DBD-ODBC-1.56/ODBC.xs   2015-07-22 18:46:51.000000000 +0200
+++ new/DBD-ODBC-1.57/ODBC.xs   2016-12-12 10:15:43.000000000 +0100
@@ -96,9 +96,9 @@
     rc = SQLGetDiagRec(SQL_HANDLE_STMT, imp_sth->hstmt, record,
                        state, &native, msg, sizeof(msg), &msg_len);
     if (SQL_SUCCEEDED(rc)) {
-        XPUSHs(sv_2mortal(newSVpv(state, 0)));
+        XPUSHs(sv_2mortal(newSVpvn(state, 0)));
         XPUSHs(sv_2mortal(newSViv(native)));
-        XPUSHs(sv_2mortal(newSVpv(msg, 0)));
+        XPUSHs(sv_2mortal(newSVpvn(msg, 0)));
     } else if (rc == SQL_NO_DATA) {
       # no diags found
     } else {
@@ -161,7 +161,7 @@
         } else if (info_ptr == &ret_type) {
             XPUSHs(sv_2mortal(newSViv(ret_type)));
         } else {
-            XPUSHs(sv_2mortal(newSVpv(buf, 0)));
+            XPUSHs(sv_2mortal(newSVpvn(buf, 0)));
         }
     } else if (rc == SQL_NO_DATA) {
       # no diags found
@@ -287,7 +287,7 @@
  #     rc = odbc_describe_col(sth, colno, ColumnName, sizeof(ColumnName), 
&NameLength,
  #                     &DataType, &ColumnSize, &DecimalDigits, &Nullable);
  #     if (rc) {
- #             XPUSHs(newSVpv(ColumnName, 0));
+ #             XPUSHs(newSVpvn(ColumnName, 0));
  #             XPUSHs(newSViv(DataType));
  #             XPUSHs(newSViv(ColumnSize));
  #             XPUSHs(newSViv(DecimalDigits));
@@ -326,9 +326,9 @@
     rc = SQLGetDiagRec(SQL_HANDLE_DBC, imp_dbh->hdbc, record,
                            state, &native, msg, sizeof(msg), &msg_len);
     if (SQL_SUCCEEDED(rc)) {
-        XPUSHs(sv_2mortal(newSVpv(state, 0)));
+        XPUSHs(sv_2mortal(newSVpvn(state, 0)));
         XPUSHs(sv_2mortal(newSViv(native)));
-        XPUSHs(sv_2mortal(newSVpv(msg, 0)));
+        XPUSHs(sv_2mortal(newSVpvn(msg, 0)));
     } else if (rc == SQL_NO_DATA) {
       # no diags found
     } else {
@@ -392,7 +392,7 @@
         } else if (info_ptr == &ret_type) {
             XPUSHs(sv_2mortal(newSViv(ret_type)));
         } else {
-            XPUSHs(sv_2mortal(newSVpv(buf, 0)));
+            XPUSHs(sv_2mortal(newSVpvn(buf, 0)));
         }
     } else if (rc == SQL_NO_DATA) {
       # no diags found
@@ -516,5 +516,3 @@
 
 
 MODULE = DBD::ODBC    PACKAGE = DBD::ODBC::db
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/t/02simple.t 
new/DBD-ODBC-1.57/t/02simple.t
--- old/DBD-ODBC-1.56/t/02simple.t      2015-01-19 09:39:25.000000000 +0100
+++ new/DBD-ODBC-1.57/t/02simple.t      2017-01-12 17:40:03.000000000 +0100
@@ -184,9 +184,21 @@
 ok(defined($sth), "prepare select from table");
 if ($sth) {
    ok($sth->execute(), "Execute select");
+   # the following 1 in the first arg is technically ok as ODBC says when the 
field descriptor
+   # (the 2nd arg) is a header field (e.g. SQL_COLUMN_COUNT) the driver should 
ignore it.
+   # However, some drivers (postgres) don't. You need to change the 1 to 0 for 
postgres to work.
+   # BUT it gets worse. Postgres doesn't have SQLColattributes (and deprecated 
ODBC 2.0 API)
+   # and so the driver manager maps calls to SQLColAttributes to 
SQLColAttribute. All would
+   # be well, BUT unixODBC until version 2.3.5 has a bug in it where when it 
maps
+   # SQLColAttributes to SQLColAttribute and you pass 0 for the column it will 
error with
+   # with invalid descripto index because bookmarks are not enabled and it did 
not handle
+   # SQL_COLUMN_COUNT - sigh.
+   # So, the upshot is if I don't change the arg below all drivers I know 
except postgres
+   # will work and if I do change the arg below all drivers on systems not 
with unixODBC 2.3.5
+   # (most now) will fail.
    my $colcount = $sth->func(1, 0, 'ColAttributes'); # 1 for col (unused) 0 
for SQL_COLUMN_COUNT
    #diag("Column count is: $colcount\n");
-   is($sth->{NUM_OF_FIELDS}, $colcount,
+   is($colcount, $sth->{NUM_OF_FIELDS},
       'NUM_OF_FIELDS = ColAttributes(SQL_COLUMN_COUNT)');
    my ($coltype, $colname, $i, @row);
    my $is_ok = 0;
@@ -204,7 +216,7 @@
           diag("Coltype $coltype for column $colname not found in list ", 
join(', ', @{$ODBCTEST::TestFieldInfo{$colname}}), "\n");
       }
    }
-   is($is_ok, $colcount, "Col count matches correct col count");
+   is($colcount, $is_ok, "Col count matches correct col count");
    # print "not " unless $is_ok == $colcount;
    # print "ok 9\n";
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/t/03dbatt.t 
new/DBD-ODBC-1.57/t/03dbatt.t
--- old/DBD-ODBC-1.56/t/03dbatt.t       2015-01-17 14:43:49.000000000 +0100
+++ new/DBD-ODBC-1.57/t/03dbatt.t       2017-01-12 17:43:46.000000000 +0100
@@ -119,8 +119,9 @@
 $rows = 0;
 if ($sth = $dbh->column_info(undef, undef, $ODBCTEST::table_name, undef)) {
     my $fetched = $sth->fetchall_arrayref;
-    cmp_ok(scalar(@$fetched), '>', 0, "column info returns more than one row 
for test table") or
-        diag(Dumper($fetched));
+    cmp_ok(scalar(@$fetched), '>', 0, "column info returns a row for test 
table " .
+               $ODBCTEST::table_name) or
+               diag(Dumper($fetched));
 }
 
 $rows = 0;
@@ -225,4 +226,3 @@
 
 
 # ------------------------------------------------------------
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/t/05meth.t new/DBD-ODBC-1.57/t/05meth.t
--- old/DBD-ODBC-1.56/t/05meth.t        2015-10-16 16:57:16.000000000 +0200
+++ new/DBD-ODBC-1.57/t/05meth.t        2017-01-12 18:09:41.000000000 +0100
@@ -10,7 +10,7 @@
 my $has_test_nowarnings = 1;
 eval "require Test::NoWarnings";
 $has_test_nowarnings = undef if $@;
-my $tests = 15;
+my $tests = 16;
 $tests += 1 if $has_test_nowarnings;
 plan tests => $tests;
 
@@ -59,6 +59,7 @@
 $dbh->rollback();
 pass("finished and rolled back");
 
+$dbh->{RaiseError} = 1;
 $sth = $dbh->prepare("SELECT * FROM $ODBCTEST::table_name WHERE 1 = 0");
 $sth->execute();
 @row = $sth->fetchrow();
@@ -78,32 +79,49 @@
 }
 $sth->finish();
 
-$sth->execute();
-$sth->bind_col(1, \$a);
-$sth->bind_col(2, \$b);
-while ($sth->fetch()) {
-    print " bind_col a,b:", $a, ",", $b, "\n";
-    unless (defined($a) && defined($b)) {
-        print "not ";
-        last;
-       }
-}
-pass("?");
-$sth->finish();
+my $skip;
+eval {$sth->execute()};
+if (my $ev = $@) {
+    if ($ev =~ /No query has been executed/) {
+        fail("Looks like you might be using Postgres ODBC driver which will 
fail this test " .
+                 "unless you add UseDeclareFetch=1 to your DSN");
+    } else {
+        fail("reexecute on prepared statement - $ev");
+    }
+    $skip = 1;
+} else {
+    ok('rexecute on prepared statement');
+}
+
+SKIP: {
+    skip "reexecute failed", 2 if $skip;
+
+    $sth->bind_col(1, \$a);
+    $sth->bind_col(2, \$b);
+    while ($sth->fetch()) {
+        print " bind_col a,b:", $a, ",", $b, "\n";
+        unless (defined($a) && defined($b)) {
+            print "not ";
+            last;
+        }
+    }
+    pass("?");
+    $sth->finish();
 
-($a, $b) = (undef, undef);
-$sth->execute();
-$sth->bind_columns(undef, \$b, \$a);
-while ($sth->fetch()) {
-    print " bind_columns a,b:", $b, ",", $a, "\n";
-    unless (defined($a) && defined($b)) {
-        print "not ";
-        last;
-       }
-}
-pass("??");
+    ($a, $b) = (undef, undef);
+    $sth->execute();
+    $sth->bind_columns(undef, \$b, \$a);
+    while ($sth->fetch()) {
+        print " bind_columns a,b:", $b, ",", $a, "\n";
+        unless (defined($a) && defined($b)) {
+            print "not ";
+            last;
+        }
+    }
+    pass("??");
 
-$sth->finish();
+    $sth->finish();
+};
 
 # turn off error warnings.  We expect one here (invalid transaction state)
 $dbh->{RaiseError} = 0;
@@ -126,4 +144,3 @@
 # (XXX not reliable, iodbc-2.12 with "INTERSOLV dBase IV ODBC Driver" == -1)
 #print "# DBI::err=$DBI::err\nnot " if $DBI::err ne "25000";
 #print "ok 7\n";
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.56/t/ODBCTEST.pm 
new/DBD-ODBC-1.57/t/ODBCTEST.pm
--- old/DBD-ODBC-1.56/t/ODBCTEST.pm     2015-01-19 09:39:25.000000000 +0100
+++ new/DBD-ODBC-1.57/t/ODBCTEST.pm     2017-01-12 18:17:19.000000000 +0100
@@ -21,7 +21,7 @@
    use Test::More;
 
    $VERSION = '0.01';
-   $table_name = "PERL_DBD_TEST";
+   $table_name = "perl_dbd_test";
 
    $longstr = "THIS IS A STRING LONGER THAN 80 CHARS.  THIS SHOULD BE CHECKED 
FOR TRUNCATION AND COMPARED WITH ITSELF.";
    $longstr2 = $longstr . "  " . $longstr . "  " . $longstr . "  " . $longstr;
@@ -78,7 +78,7 @@
            $fields .= "$f ";
            # print "-- $fields\n";
            my $row = get_type_for_column($dbh, $f);
-           $fields .= $row->{TYPE_NAME};    
+           $fields .= $row->{TYPE_NAME};
       if ($row->{CREATE_PARAMS}) {
                if ($drvname =~ /OdbcFb/i) {
                    # Firebird ODBC driver seems to be badly broken - for
@@ -265,4 +265,3 @@
    }
    1;
 }
-


Reply via email to