Mailinglist Archive: opensuse-commit (1670 mails)

< Previous Next >
commit perl-SQL-Statement
  • From: root@xxxxxxx (h_root)
  • Date: Sat, 21 Oct 2006 21:29:38 +0200 (CEST)
  • Message-id: <20061021192938.1BF6284813@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package perl-SQL-Statement
checked in at Sat Oct 21 21:29:38 CEST 2006.

--------
--- perl-SQL-Statement/perl-SQL-Statement.changes 2006-01-25 21:39:56.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-SQL-Statement/perl-SQL-Statement.changes 2006-10-20 18:52:57.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Oct 20 18:52:35 CEST 2006 - mrueckert@xxxxxxx
+
+- update to version 1.15:
+ * fixed placeholder bug in SQL::Statement::UPDATE
+
+-------------------------------------------------------------------

Old:
----
SQL-Statement-1.14.tar.bz2

New:
----
SQL-Statement-1.15.tar.bz2

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

Other differences:
------------------
++++++ perl-SQL-Statement.spec ++++++
--- /var/tmp/diff_new_pack.dsLqGv/_old 2006-10-21 21:29:14.000000000 +0200
+++ /var/tmp/diff_new_pack.dsLqGv/_new 2006-10-21 21:29:14.000000000 +0200
@@ -1,20 +1,20 @@
#
-# spec file for package perl-SQL-Statement (Version 1.14)
+# spec file for package perl-SQL-Statement (Version 1.15)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://www.suse.de/feedback/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name: perl-SQL-Statement
Summary: Perl Module SQL::Statement
-Version: 1.14
+Version: 1.15
Release: 1
-License: GPL
+License: GNU General Public License (GPL) - all versions
Group: Development/Libraries/Perl
Source0: SQL-Statement-%{version}.tar.bz2
URL: http://www.cpan.org
@@ -57,6 +57,9 @@
/var/adm/perl-modules/%{name}

%changelog -n perl-SQL-Statement
+* Fri Oct 20 2006 - mrueckert@xxxxxxx
+- update to version 1.15:
+ * fixed placeholder bug in SQL::Statement::UPDATE
* Wed Jan 25 2006 - mls@xxxxxxx
- converted neededforbuild to BuildRequires
* Mon Aug 01 2005 - cthiel@xxxxxxx

++++++ SQL-Statement-1.14.tar.bz2 -> SQL-Statement-1.15.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/Changes new/SQL-Statement-1.15/Changes
--- old/SQL-Statement-1.14/Changes 2005-04-22 04:25:04.000000000 +0200
+++ new/SQL-Statement-1.15/Changes 2006-02-22 22:19:05.000000000 +0100
@@ -1,5 +1,10 @@
Changes log for Perl extension SQL::Statement

+Version 1.15, released 2 February, 2006
+----------------------------------------
+* fixed placeholder bug in SQL::Statement::UPDATE
+ thanks for bug report Tanktalus
+
Version 1.14, released 21 April, 2005
----------------------------------------
* fixed circular dependency in tests (one mistakenly required AnyData)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/META.yml new/SQL-Statement-1.15/META.yml
--- old/SQL-Statement-1.14/META.yml 2005-04-22 21:03:46.000000000 +0200
+++ new/SQL-Statement-1.15/META.yml 2006-02-22 22:19:59.000000000 +0100
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: SQL-Statement
-version: 1.14
+version: 1.15
version_from: ./lib/SQL/Statement.pm
installdirs: site
requires:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/lib/SQL/Statement.pm new/SQL-Statement-1.15/lib/SQL/Statement.pm
--- old/SQL-Statement-1.14/lib/SQL/Statement.pm 2005-04-22 05:08:09.000000000 +0200
+++ new/SQL-Statement-1.15/lib/SQL/Statement.pm 2005-09-26 20:49:35.000000000 +0200
@@ -31,7 +31,7 @@

#use locale;

-$VERSION = '1.14';
+$VERSION = '1.15';
$dlm = '~';
$arg_num=0;
$warg_num=0;
@@ -387,10 +387,12 @@
sub UPDATE ($$$) {
my($self, $data, $params) = @_;
my $valnum = $self->{num_val_placeholders};
+ my @val_params;
if ($valnum) {
- my @val_params = splice @$params, 0,$valnum;
- @$params = (@$params,@val_params);
-# my @where_params = $params->[$valnum+1..scalar @$params-1];
+ @val_params = splice @$params, 0,$valnum;
+# @$params = (@$params,@val_params);
+
+# my @where_params = $params->[$valnum+1..scalar @$params-1];
# @$params = (@where_params,@val_params);
}
my($eval,$all_cols) = $self->open_tables($data, 0, 1);
@@ -426,10 +428,12 @@
$col = $self->columns($i);
$val = $self->row_values($i);
if (ref($val) eq 'SQL::Statement::Param') {
- $val = $eval->param($val->num());
+# $val = $eval->param($val->num());
+ $val = shift @val_params;
}
elsif ($val->{type} eq 'placeholder') {
- $val = $eval->param($param_num++);
+# $val = $eval->param($param_num++);
+ $val = shift @val_params;
}
else {
$val = $self->get_row_value($val,$eval,$rowhash);
@@ -1293,13 +1297,13 @@

# The old way, now replaced, called get_row_value everytime
#
- # my $val1 = $self->get_row_value( $pred->{"arg1"}, $eval, $rowhash );
- # my $val2 = $self->get_row_value( $pred->{"arg2"}, $eval, $rowhash );
+ my $val1 = $self->get_row_value( $pred->{"arg1"}, $eval, $rowhash );
+ my $val2 = $self->get_row_value( $pred->{"arg2"}, $eval, $rowhash );

# define types that we only need to call get_row_value on once
# per execute
#
- my %is_value = map {$_=>1} qw(placeholder string number null);
+## my %is_value = map {$_=>1} qw(placeholder string number null);

# use a reuse value if defined, get_row_value() otherwise
#
@@ -1310,22 +1314,23 @@
# $new_execute is set to 1 at the start of execute()
# and set to 0 at the end of eval_where()
#
- my $val1 = (!$new_execute and defined $pred->{arg1}->{reuse})
- ? $pred->{arg1}->{reuse}
- : $self->get_row_value( $pred->{"arg1"}, $eval, $rowhash );
- my $val2 = (!$new_execute and defined $pred->{arg2}->{reuse})
- ? $pred->{arg2}->{reuse}
- : $self->get_row_value( $pred->{"arg2"}, $eval, $rowhash );
+
+## my $val1 = (!$new_execute and defined $pred->{arg1}->{reuse})
+## ? $pred->{arg1}->{reuse}
+## : $self->get_row_value( $pred->{"arg1"}, $eval, $rowhash );
+## my $val2 = (!$new_execute and defined $pred->{arg2}->{reuse})
+## ? $pred->{arg2}->{reuse}
+## : $self->get_row_value( $pred->{"arg2"}, $eval, $rowhash );

# the first time we call get_row_value, we set the reuse value
# for the argument object with its scalar value
#
- my $type1 = $pred->{arg1}->{type} if ref($pred->{arg1}) eq 'HASH';
- my $type2 = $pred->{arg2}->{type} if ref($pred->{arg2}) eq 'HASH';
- $pred->{arg1}->{reuse} = $val1
- if $type1 and $is_value{$type1} and $new_execute;
- $pred->{arg2}->{reuse} = $val2
- if $type2 and $is_value{$type2} and $new_execute;
+## my $type1 = $pred->{arg1}->{type} if ref($pred->{arg1}) eq 'HASH';
+## my $type2 = $pred->{arg2}->{type} if ref($pred->{arg2}) eq 'HASH';
+## $pred->{arg1}->{reuse} = $val1
+## if $type1 and $is_value{$type1} and $new_execute;
+## $pred->{arg2}->{reuse} = $val2
+## if $type2 and $is_value{$type2} and $new_execute;

my $op = $pred->{op};
my $opfunc = $op;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/03executeDBD.t new/SQL-Statement-1.15/t/03executeDBD.t
--- old/SQL-Statement-1.14/t/03executeDBD.t 2005-04-22 21:01:29.000000000 +0200
+++ new/SQL-Statement-1.15/t/03executeDBD.t 2005-09-26 20:54:18.000000000 +0200
@@ -7,16 +7,31 @@
eval {
require DBI;
require DBD::File;
+ require IO::File;
};
if ($@) {
plan skip_all => "Requires DBI and DBD::File";
}
else {
- plan tests => 16;
+ plan tests => 22;
}
my($sth,$str);
my $dbh = DBI->connect('dbi:File(RaiseError=1):');

+$dbh->do(q{ CREATE TEMP TABLE Tmp (id INT,phrase VARCHAR(30)) } );
+ok($dbh->do(q{ INSERT INTO Tmp (id,phrase) VALUES (?,?) },{},9,'yyy'),'placeholder insert with named cols');
+ok($dbh->do(q{ INSERT INTO Tmp VALUES(?,?) },{},2,'zzz'),'placeholder insert without named cols');
+$dbh->do(q{ INSERT INTO Tmp (id,phrase) VALUES (?,?) },{},3,'baz');
+ok($dbh->do(q{ DELETE FROM Tmp WHERE id=? or phrase=? },{},3,'baz'),'placeholder delete');
+ok($dbh->do(q{ UPDATE Tmp SET phrase=? WHERE id=?},{},'bar',2),'placeholder update');
+ok($dbh->do(q{ UPDATE Tmp SET phrase=?,id=? WHERE id=? and phrase=?},{},'foo',1,9,'yyy'),'placeholder update');
+$sth = $dbh->prepare("SELECT id,phrase FROM Tmp");
+$sth->execute;
+$str = '';
+while (my $r=$sth->fetch) { $str.="@$r^"; }
+ok($str eq '1 foo^2 bar^','Placeholders');
+$dbh->do(q{ DROP TABLE IF EXISTS Tmp } );
+
########################################
# CREATE, INSERT, UPDATE, DELETE, SELECT
########################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/04names.t new/SQL-Statement-1.15/t/04names.t
--- old/SQL-Statement-1.14/t/04names.t 2005-04-22 04:44:09.000000000 +0200
+++ new/SQL-Statement-1.15/t/04names.t 2005-09-26 20:54:36.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use Test::More;
use lib qw( ../lib );
-eval {require DBI; require DBD::File;};
+eval {require DBI; require DBD::File; require IO::File;};
if ($@) {
plan skip_all => "DBI or DBD::File not available";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/05create.t new/SQL-Statement-1.15/t/05create.t
--- old/SQL-Statement-1.14/t/05create.t 2005-04-22 04:45:29.000000000 +0200
+++ new/SQL-Statement-1.15/t/05create.t 2005-09-26 20:54:57.000000000 +0200
@@ -2,7 +2,7 @@
$|=1;
use strict;
use Test::More;
-eval { require DBI; require DBD::File; };
+eval { require DBI; require DBD::File; require IO::File;};
if ($@) {
plan skip_all => "No DBI or DBD::File available";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/06group.t new/SQL-Statement-1.15/t/06group.t
--- old/SQL-Statement-1.14/t/06group.t 2005-04-22 04:45:47.000000000 +0200
+++ new/SQL-Statement-1.15/t/06group.t 2005-09-26 20:55:10.000000000 +0200
@@ -4,7 +4,7 @@
use Test::More;
use lib qw( ../lib );
use vars qw($DEBUG);
-eval { require DBI; require DBD::File; };
+eval { require DBI; require DBD::File; require IO::File; };
if ($@) {
plan skip_all => "No DBI or DBD::File available";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/07case.t new/SQL-Statement-1.15/t/07case.t
--- old/SQL-Statement-1.14/t/07case.t 2005-04-22 04:46:38.000000000 +0200
+++ new/SQL-Statement-1.15/t/07case.t 2005-09-26 20:55:20.000000000 +0200
@@ -4,7 +4,7 @@
use lib qw( ../lib );
use vars qw($DEBUG);
use Test::More;
-eval { require DBI; require DBD::File;};
+eval { require DBI; require DBD::File; require IO::File; };
if ($@) {
plan skip_all => "No DBI or DBD::File available";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/08join.t new/SQL-Statement-1.15/t/08join.t
--- old/SQL-Statement-1.14/t/08join.t 2005-04-22 04:46:47.000000000 +0200
+++ new/SQL-Statement-1.15/t/08join.t 2005-09-26 20:55:36.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use Test::More;
use lib qw( ../lib );
-eval { require DBI; require DBD::File;};
+eval { require DBI; require DBD::File; require IO::File };
if ($@) {
plan skip_all => "No DBD::File available";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/SQL-Statement-1.14/t/14allcols.t new/SQL-Statement-1.15/t/14allcols.t
--- old/SQL-Statement-1.14/t/14allcols.t 2005-04-22 04:47:15.000000000 +0200
+++ new/SQL-Statement-1.15/t/14allcols.t 2005-09-26 20:57:09.000000000 +0200
@@ -5,7 +5,7 @@
$|=1;
use strict;
use Test::More;
-eval { require DBI; require DBD::File; };
+eval { require DBI; require DBD::File; require IO::File; };
if ($@) {
plan skip_all => "No DBI or DBD::File available";
}


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



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages