r34397 - in /trunk/libdbd-odbc-perl: Changes FAQ MANIFEST META.yml ODBC.pm dbdimp.c debian/changelog t/02simple.t t/12blob.t test_results.txt
bricas-guest at users.alioth.debian.org
bricas-guest at users.alioth.debian.org
Thu Apr 30 12:29:09 UTC 2009
Author: bricas-guest
Date: Thu Apr 30 12:29:04 2009
New Revision: 34397
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34397
Log:
New upstream release
Added:
trunk/libdbd-odbc-perl/test_results.txt
Modified:
trunk/libdbd-odbc-perl/Changes
trunk/libdbd-odbc-perl/FAQ
trunk/libdbd-odbc-perl/MANIFEST
trunk/libdbd-odbc-perl/META.yml
trunk/libdbd-odbc-perl/ODBC.pm
trunk/libdbd-odbc-perl/dbdimp.c
trunk/libdbd-odbc-perl/debian/changelog
trunk/libdbd-odbc-perl/t/02simple.t
trunk/libdbd-odbc-perl/t/12blob.t
Modified: trunk/libdbd-odbc-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/Changes?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/Changes (original)
+++ trunk/libdbd-odbc-perl/Changes Thu Apr 30 12:29:04 2009
@@ -43,7 +43,20 @@
=head1 CHANGES
-=head2 Changes in DBD::ODBC 1.20 April 7, 2009
+=head2 Changes in DBD::ODBC 1.21 April 27, 2009
+
+Change 02simple test to output Perl, DBI and DBD::ODBC versions.
+
+Fixed bug where if ODBC driver supports SQLDescribeParam and it
+succeeds for a parameterised query but you override the parameter
+type, DBD::ODBC was still using the size returned by
+SQLDescribeParam. Thanks to Brian Becker for finding, diagnosing and
+fixing this issue.
+
+Added FAQ entry about SQL Server and calling procedures with named
+parameters out of order.
+
+=head2 Changes in DBD::ODBC 1.20 April 20, 2009
Fix bug in handling of SQL_WLONGVARCHAR when not built with unicode
support. The column was not identified as a long column and hence the
Modified: trunk/libdbd-odbc-perl/FAQ
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/FAQ?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/FAQ (original)
+++ trunk/libdbd-odbc-perl/FAQ Thu Apr 30 12:29:04 2009
@@ -524,6 +524,36 @@
error e.g., if you attempt to bind a non-datetime string to a datetime
column or a non-numeric string to a numeric column.
+=head2 Why do I get strange results with SQL Server and named parameters?
+
+If you are using a MS SQL Server driver and named parameters to
+procedures be very careful to use then in the sasme order they are
+defined in the procedure. i.e., if you have a procedure like this:
+
+ create procedure test
+ @param1 varchar(50),
+ @param2 smallint
+ as
+ begin
+ ..
+ end
+
+then ensure if you call it using named parameters you specify them in
+the same order they are declared:
+
+ exec test @param1=?, at param2=?
+
+and not
+
+ exec test @param2=?, at param1=?
+
+The reason for this is that all SQL Server drivers we have seen
+describe procedures parameters in the order they are declared and
+ignore the order they are used in the SQL. If you specify them out of
+order DBD::ODBC will get details on p1 which are really for p2
+etc. This can lead to data truncation errors and all sort of other
+problems it is impossible for DBD::ODBC spot or workaround.
+
=head1 AUTHOR
Parts of this document were written by Tim Bunce,
Modified: trunk/libdbd-odbc-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/MANIFEST?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/MANIFEST (original)
+++ trunk/libdbd-odbc-perl/MANIFEST Thu Apr 30 12:29:04 2009
@@ -10,6 +10,7 @@
Makefile.PL
MANIFEST This list of files
META.yml
+test_results.txt
examples/cancel.pl
examples/coltest.pl
examples/contest.pl
Modified: trunk/libdbd-odbc-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/META.yml?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/META.yml (original)
+++ trunk/libdbd-odbc-perl/META.yml Thu Apr 30 12:29:04 2009
@@ -1,7 +1,7 @@
--- #YAML:1.0
name: DBD-ODBC
abstract: ODBC DBD for Perl DBI
-version: 1.20
+version: 1.21
version_from: ODBC.pm
author:
- Tim Bunce
Modified: trunk/libdbd-odbc-perl/ODBC.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/ODBC.pm?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/ODBC.pm (original)
+++ trunk/libdbd-odbc-perl/ODBC.pm Thu Apr 30 12:29:04 2009
@@ -12,7 +12,7 @@
require 5.006;
-$DBD::ODBC::VERSION = '1.20';
+$DBD::ODBC::VERSION = '1.21';
{
package DBD::ODBC;
Modified: trunk/libdbd-odbc-perl/dbdimp.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/dbdimp.c?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/dbdimp.c (original)
+++ trunk/libdbd-odbc-perl/dbdimp.c Thu Apr 30 12:29:04 2009
@@ -2290,7 +2290,7 @@
/* Bind output column variables */
if (DBIc_TRACE(imp_sth, 0, 0, 4))
PerlIO_printf(DBIc_LOGPIO(imp_dbh),
- "Bind %d: type = %s(%d), buf=%p, buflen=%ld\n",
+ " Bind %d: type = %s(%d), buf=%p, buflen=%ld\n",
i+1, S_SqlTypeToString(fbh->ftype), fbh->ftype,
fbh->data, fbh->ColDisplaySize);
rc = SQLBindCol(imp_sth->hstmt,
@@ -3209,7 +3209,8 @@
}
if ((phs->describe_param_called == 1) &&
- (SQL_SUCCEEDED(phs->describe_param_status))) {
+ (SQL_SUCCEEDED(phs->describe_param_status)) &&
+ (phs->requested_type == 0)) { /* type not overriden */
default_column_size = phs->param_size;
} else {
if ((phs->sql_type == SQL_VARCHAR) && !phs->is_inout) {
Modified: trunk/libdbd-odbc-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/debian/changelog?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/debian/changelog (original)
+++ trunk/libdbd-odbc-perl/debian/changelog Thu Apr 30 12:29:04 2009
@@ -1,3 +1,9 @@
+libdbd-odbc-perl (1.21-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Brian Cassidy <brian.cassidy at gmail.com> Thu, 30 Apr 2009 09:27:55 -0300
+
libdbd-odbc-perl (1.20-1) unstable; urgency=low
[ Brian Cassidy ]
Modified: trunk/libdbd-odbc-perl/t/02simple.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/t/02simple.t?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/t/02simple.t (original)
+++ trunk/libdbd-odbc-perl/t/02simple.t Thu Apr 30 12:29:04 2009
@@ -3,6 +3,7 @@
use Test::More;
use strict;
+use Config;
$| = 1;
@@ -38,6 +39,10 @@
# Output DBMS which is useful when debugging cpan-testers output
{
diag("\n");
+ diag("Perl $Config{PERL_REVISION}.$Config{PERL_SUBVERSION}.$Config{PERL_VERSION}\n");
+ diag("osname=$Config{osname}, osvers=$Config{osvers}, archname=$Config{archname}\n");
+ diag("Using DBI $DBI::VERSION\n");
+ diag("Using DBD::ODBC $DBD::ODBC::VERSION\n");
diag("Using DBMS_NAME " . DBI::neat($dbh->get_info(17)) . "\n");
diag("Using DBMS_VER " . DBI::neat($dbh->get_info(18)) . "\n");
$driver_name = DBI::neat($dbh->get_info(6));
Modified: trunk/libdbd-odbc-perl/t/12blob.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/t/12blob.t?rev=34397&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/t/12blob.t (original)
+++ trunk/libdbd-odbc-perl/t/12blob.t Thu Apr 30 12:29:04 2009
@@ -11,7 +11,7 @@
my $has_test_nowarnings = 1;
eval "require Test::NoWarnings";
$has_test_nowarnings = undef if $@;
-my $tests = 21;
+my $tests = 24;
$tests += 1 if $has_test_nowarnings;
plan tests => $tests;
@@ -141,7 +141,12 @@
diag($ev) if $ev;
ok(!$ev, 'select test data back');
- is($row->[0]->[0], $value, 'data read back compares');
+ my $rc = is(length($row->[0]->[0]), length($value),
+ "sizes of insert/select compare");
+ SKIP: {
+ skip "sizes do not match", 1 unless $rc;
+ is($row->[0]->[0], $value, 'data read back compares');
+ };
return;
}
Added: trunk/libdbd-odbc-perl/test_results.txt
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/test_results.txt?rev=34397&op=file
==============================================================================
--- trunk/libdbd-odbc-perl/test_results.txt (added)
+++ trunk/libdbd-odbc-perl/test_results.txt Thu Apr 30 12:29:04 2009
@@ -1,0 +1,51 @@
+======================================================================
+t/01base................ok
+t/02simple..............ok 1/65#
+# Perl v5.9.5 built for MSWin32-x64-multi-thread
+# Using DBI 1.59
+# Using DBD::ODBC 1.20
+# Using DBMS_NAME 'Microsoft SQL Server'
+# Using DBMS_VER '09.00.3042'
+# Using DRIVER_NAME 'sqlncli10.dll'
+# Using DRIVER_VER '10.00.1049'
+# odbc_has_unicode 1
+t/02simple..............ok
+t/03dbatt...............ok 1/29#
+# N.B. Some drivers (postgres/cache) may return ODBC 2.0 column names for the SQ
+LTables result-set e.g. TABLE_QUALIFIER instead of TABLE_CAT
+t/03dbatt...............ok
+t/05meth................ok
+t/07bind................ok
+t/08bind2...............ok
+t/09multi...............ok
+t/10handler.............ok
+t/12blob................ok
+t/20SqlServer...........ok
+t/30Oracle..............ok
+ 3/5 skipped: various reasons
+t/40UnicodeRoundTrip....ok
+t/41Unicode.............ok
+t/pod-coverage..........ok 1/1# Test::Pod::Coverage 1.04 required for testing PO
+D coverage
+t/pod-coverage..........ok
+t/pod...................ok
+ 3/3 skipped: various reasons
+t/rt_38977..............ok
+t/rt_39841..............ok 1/28# [Microsoft][SQL Server Native Client 10.0]Inval
+id character value for cast specification (SQL-22018)
+# 22018
+#
+# NOTE: Your SQL Server ODBC driver has a bug which can describe parameters
+# in SQL using sub selects incorrectly. In this case a VARCHAR(8) parameter
+# is described as an INTEGER
+#
+# Checking you can work around bug in SQL Server ODBC Driver
+# Yes you can
+t/rt_39841..............ok
+ 5/28 skipped: various reasons
+t/rt_39897..............ok
+t/rt_43384..............ok
+ 7/9 skipped: various reasons
+All tests successful, 18 subtests skipped.
+Files=19, Tests=427, 11 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
+======================================================================
More information about the Pkg-perl-cvs-commits
mailing list