From 349eec3155cefd342d6157811016e42cf8cb7498 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 1 Mar 2018 09:17:16 +0100 Subject: [PATCH] 1.56 bump --- .gitignore | 1 + ...constraint-ops-introduced-in-SQLite-.patch | 80 ------------------- perl-DBD-SQLite.spec | 10 +-- sources | 2 +- 4 files changed, 7 insertions(+), 86 deletions(-) delete mode 100644 DBD-SQLite-1.54-added-new-index-constraint-ops-introduced-in-SQLite-.patch diff --git a/.gitignore b/.gitignore index dd4841a..2a177fd 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ DBD-SQLite-1.29.tar.gz /DBD-SQLite-1.50.tar.gz /DBD-SQLite-1.52.tar.gz /DBD-SQLite-1.54.tar.gz +/DBD-SQLite-1.56.tar.gz diff --git a/DBD-SQLite-1.54-added-new-index-constraint-ops-introduced-in-SQLite-.patch b/DBD-SQLite-1.54-added-new-index-constraint-ops-introduced-in-SQLite-.patch deleted file mode 100644 index c6a6125..0000000 --- a/DBD-SQLite-1.54-added-new-index-constraint-ops-introduced-in-SQLite-.patch +++ /dev/null @@ -1,80 +0,0 @@ -From da3306e443661f3a291367166ae3e2080acd5c45 Mon Sep 17 00:00:00 2001 -From: Kenichi Ishigaki -Date: Tue, 21 Nov 2017 03:25:30 +0900 -Subject: [PATCH] added new index constraint ops introduced in SQLite 3.21.0 to - PerlData (GH#28) - ---- - dbdimp_virtual_table.inc | 12 ++++++++++++ - lib/DBD/SQLite/VirtualTable/PerlData.pm | 18 +++++++++++++++++- - 2 files changed, 29 insertions(+), 1 deletion(-) - -diff --git a/dbdimp_virtual_table.inc b/dbdimp_virtual_table.inc -index 3dfb3c5..3f87619 100644 ---- a/dbdimp_virtual_table.inc -+++ b/dbdimp_virtual_table.inc -@@ -194,6 +194,18 @@ _constraint_op_to_string(unsigned char op) { - return "GLOB"; - case SQLITE_INDEX_CONSTRAINT_REGEXP: - return "REGEXP"; -+#endif -+#if SQLITE_VERSION_NUMBER >= 3021000 -+ case SQLITE_INDEX_CONSTRAINT_NE: -+ return "NE"; -+ case SQLITE_INDEX_CONSTRAINT_ISNOT: -+ return "ISNOT"; -+ case SQLITE_INDEX_CONSTRAINT_ISNOTNULL: -+ return "ISNOTNULL"; -+ case SQLITE_INDEX_CONSTRAINT_ISNULL: -+ return "ISNULL"; -+ case SQLITE_INDEX_CONSTRAINT_IS: -+ return "IS"; - #endif - default: - return "unknown"; -diff --git a/lib/DBD/SQLite/VirtualTable/PerlData.pm b/lib/DBD/SQLite/VirtualTable/PerlData.pm -index 8151fe1..697cd08 100644 ---- a/lib/DBD/SQLite/VirtualTable/PerlData.pm -+++ b/lib/DBD/SQLite/VirtualTable/PerlData.pm -@@ -6,6 +6,7 @@ use warnings; - use base 'DBD::SQLite::VirtualTable'; - use DBD::SQLite; - use constant SQLITE_3010000 => $DBD::SQLite::sqlite_version_number >= 3010000 ? 1 : 0; -+use constant SQLITE_3021000 => $DBD::SQLite::sqlite_version_number >= 3021000 ? 1 : 0; - - # private data for translating comparison operators from Sqlite to Perl - my $TXT = 0; -@@ -23,6 +24,13 @@ my %SQLOP2PERLOP = ( - 'GLOB' => [ 'DBD::SQLite::strglob', 'DBD::SQLite::strglob' ], - 'REGEXP'=> [ '=~', '=~' ], - ) : ()), -+ (SQLITE_3021000 ? ( -+ 'NE' => [ 'ne', '!=' ], -+ 'ISNOT' => [ 'defined', 'defined' ], -+ 'ISNOTNULL' => [ 'defined', 'defined' ], -+ 'ISNULL' => [ '!defined', '!defined' ], -+ 'IS' => [ '!defined', '!defined' ], -+ ) : ()), - ); - - #---------------------------------------------------------------------- -@@ -101,7 +109,15 @@ sub BEST_INDEX { - $optype = $self->{optypes}[$col]; - } - my $op = $SQLOP2PERLOP{$constraint->{op}}[$optype]; -- if (SQLITE_3010000 && $op =~ /str/) { -+ if (SQLITE_3021000 && $op =~ /defined/) { -+ if ($constraint->{op} =~ /NULL/) { -+ push @conditions, -+ "($op($member))"; -+ } else { -+ push @conditions, -+ "($op($member) && $op(\$vals[$ix]))"; -+ } -+ } elsif (SQLITE_3010000 && $op =~ /str/) { - push @conditions, - "(defined($member) && defined(\$vals[$ix]) && !$op(\$vals[$ix], $member))"; - } else { --- -2.14.3 - diff --git a/perl-DBD-SQLite.spec b/perl-DBD-SQLite.spec index 4049523..348345c 100644 --- a/perl-DBD-SQLite.spec +++ b/perl-DBD-SQLite.spec @@ -1,6 +1,6 @@ Name: perl-DBD-SQLite -Version: 1.54 -Release: 7%{?dist} +Version: 1.56 +Release: 1%{?dist} Summary: SQLite DBI Driver Group: Development/Libraries License: (GPL+ or Artistic) and Public Domain @@ -9,8 +9,6 @@ Source0: http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/DBD-SQLite- Patch0: perl-DBD-SQLite-bz543982.patch # Remove notes about bundled sqlite C source from man page and README Patch1: DBD-SQLite-1.50-Remove-bundled-source-extentions.patch -# Add new index constraint ops introduced in SQLite 3.21.0 to PerlData -Patch2: DBD-SQLite-1.54-added-new-index-constraint-ops-introduced-in-SQLite-.patch # if sqlite >= 3.1.3 then # perl-DBD-SQLite uses the external library # else @@ -66,7 +64,6 @@ libraries. %setup -q -n DBD-SQLite-%{version} %patch0 -p1 -b .bz543982 %patch1 -p1 -%patch2 -p1 # Remove bundled sqlite libraries (BZ#1059154) # System libraries will be used rm sqlite* @@ -91,6 +88,9 @@ make test %{_mandir}/man3/*.3pm* %changelog +* Thu Mar 01 2018 Jitka Plesnikova - 1.56-1 +- 1.56 bump + * Mon Feb 19 2018 Jitka Plesnikova - 1.54-7 - Add build-require gcc diff --git a/sources b/sources index 4123a35..f73eb50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (DBD-SQLite-1.54.tar.gz) = a8daff59679973467dff80c013b6ff9d7229a505b62c0312bdf7f9288af64dcd2e99f889b66eb98103b0e6ac7a9b0fa7c9c517c5c2673ee7f84b3b6b5d26173e +SHA512 (DBD-SQLite-1.56.tar.gz) = 1c9be3557691f76a9e543fe4bd6656a6b82f53fba4bc05261a55affa0a38b4eaa1cf876da975234c9c09985ba25b21f6f7a735f1cc47104169edf7fdd3a2e314