- added perl-DBD-SQLite2-fetchrow.patch from Debian:

Fix segfault when fetchrow() is called again after it has
  returned an empty list once. (#317453)
- added perl-DBD-SQLite2-no-return-in-nonvoid-function.patch:
  Fix function returning random data

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-DBD-SQLite2?expand=0&rev=3
This commit is contained in:
Lars Vogdt
2012-06-07 17:53:33 +00:00
committed by Git OBS Bridge
parent eab4467bd7
commit 900f3d7e4b
4 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
Author: Niko Tyni <ntyni@iki.fi>
Description: Fix segfault when fetchrow() is called again after it has
returned an empty list once. (#317453)
If there is a reason upstream has commented out the check
for an active handle, he's not telling it. (CPAN #16451)
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -473,11 +473,9 @@ sqlite2_st_fetch (SV *sth, imp_sth_t *im
/* warn("current_entry == %d\nnumFields == %d\nnrow == %d",
current_entry, numFields, imp_sth->nrow); */
- /*
if (!DBIc_ACTIVE(imp_sth)) {
return Nullav;
}
- */
if ((imp_sth->retval == SQLITE_DONE) || (imp_sth->retval == SQLITE_ERROR)) {
sqlite2_st_finish(sth, imp_sth);

View File

@@ -0,0 +1,12 @@
Index: DBD-SQLite2-0.33/dbdimp.c
===================================================================
--- DBD-SQLite2-0.33.orig/dbdimp.c
+++ DBD-SQLite2-0.33/dbdimp.c
@@ -459,6 +459,7 @@ sqlite2_bind_ph (SV *sth, imp_sth_t *imp
else {
av_store(imp_sth->params, SvIV(param) - 1, SvREFCNT_inc(value));
}
+ return -1;
}
AV *

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Jun 7 17:51:46 UTC 2012 - lars@linux-schulserver.de
- added perl-DBD-SQLite2-fetchrow.patch from Debian:
Fix segfault when fetchrow() is called again after it has
returned an empty list once. (#317453)
- added perl-DBD-SQLite2-no-return-in-nonvoid-function.patch:
Fix function returning random data
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 7 19:16:26 UTC 2012 - lars@linux-schulserver.de Mon May 7 19:16:26 UTC 2012 - lars@linux-schulserver.de

View File

@@ -26,9 +26,13 @@ Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/DBD-SQLite2/ Url: http://search.cpan.org/dist/DBD-SQLite2/
#Source: http://www.cpan.org/authors/id/M/MS/MSERGEANT/DBD-SQLite2-%{version}.tar.gz #Source: http://www.cpan.org/authors/id/M/MS/MSERGEANT/DBD-SQLite2-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.gz Source: %{cpan_name}-%{version}.tar.gz
Patch0: %{name}-fetchrow.patch
Patch1: %{name}-no-return-in-nonvoid-function.patch
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
BuildRequires: sqlite2-devel
BuildRequires: perl(DBI) >= 1.21 BuildRequires: perl(DBI) >= 1.21
BuildRequires: perl(Test::More)
Requires: perl(DBI) >= 1.21 Requires: perl(DBI) >= 1.21
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires} %{perl_requires}
@@ -68,6 +72,8 @@ details on how to use DBI itself.
%prep %prep
%setup -q -n %{cpan_name}-%{version} %setup -q -n %{cpan_name}-%{version}
%patch0 -p1
##%patch1 -p1
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"