r71976 - in /trunk/libkinosearch-perl: ./ core/KinoSearch/Index/ core/KinoSearch/Plan/ core/KinoSearch/Test/Index/ core/KinoSearch/Test/Plan/ debian/ lib/ lib/KinoSearch/ t/binding/ t/core/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Mar 25 15:10:14 UTC 2011
Author: gregoa
Date: Fri Mar 25 15:09:55 2011
New Revision: 71976
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71976
Log:
New upstream release.
Added:
trunk/libkinosearch-perl/core/KinoSearch/Test/Index/TestPolyReader.c
- copied unchanged from r71975, branches/upstream/libkinosearch-perl/current/core/KinoSearch/Test/Index/TestPolyReader.c
trunk/libkinosearch-perl/core/KinoSearch/Test/Index/TestPolyReader.cfh
- copied unchanged from r71975, branches/upstream/libkinosearch-perl/current/core/KinoSearch/Test/Index/TestPolyReader.cfh
trunk/libkinosearch-perl/core/KinoSearch/Test/Plan/TestFieldType.c
- copied unchanged from r71975, branches/upstream/libkinosearch-perl/current/core/KinoSearch/Test/Plan/TestFieldType.c
trunk/libkinosearch-perl/core/KinoSearch/Test/Plan/TestFieldType.cfh
- copied unchanged from r71975, branches/upstream/libkinosearch-perl/current/core/KinoSearch/Test/Plan/TestFieldType.cfh
trunk/libkinosearch-perl/t/core/225-polyreader.t
- copied unchanged from r71975, branches/upstream/libkinosearch-perl/current/t/core/225-polyreader.t
trunk/libkinosearch-perl/t/core/234-field_type.t
- copied unchanged from r71975, branches/upstream/libkinosearch-perl/current/t/core/234-field_type.t
Modified:
trunk/libkinosearch-perl/Changes
trunk/libkinosearch-perl/MANIFEST
trunk/libkinosearch-perl/META.yml
trunk/libkinosearch-perl/core/KinoSearch/Index/PolyReader.c
trunk/libkinosearch-perl/core/KinoSearch/Plan/FieldType.c
trunk/libkinosearch-perl/debian/changelog
trunk/libkinosearch-perl/lib/KinoSearch.pm
trunk/libkinosearch-perl/lib/KinoSearch.pod
trunk/libkinosearch-perl/lib/KinoSearch/Test.pm
trunk/libkinosearch-perl/t/binding/702-sample.t
Modified: trunk/libkinosearch-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/Changes?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/Changes (original)
+++ trunk/libkinosearch-perl/Changes Fri Mar 25 15:09:55 2011
@@ -1,4 +1,11 @@
Revision history for KinoSearch
+
+0.313 2011-03-24
+
+ * Make FieldType checking more stringent.
+ * Fix a latent bug which might theoretically result in incorrect search
+ results on highly customized systems.
+ * Fix a test which was failing on automated testing systems.
0.312 2011-03-23
@@ -6,8 +13,7 @@
left behind or not cleaned up, etc.
* Guard against excessive search size requests.
* Skip a test which was prone to failure on automated testing systems.
- * Tweak META.yml for the so that the Clownfish build files get excluded
- properly.
+ * Tweak META.yml so that the Clownfish build files get excluded properly.
0.311 2010-12-28
Modified: trunk/libkinosearch-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/MANIFEST?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/MANIFEST (original)
+++ trunk/libkinosearch-perl/MANIFEST Fri Mar 25 15:09:55 2011
@@ -420,6 +420,8 @@
core/KinoSearch/Test/Index/TestHighlightWriter.cfh
core/KinoSearch/Test/Index/TestIndexManager.c
core/KinoSearch/Test/Index/TestIndexManager.cfh
+core/KinoSearch/Test/Index/TestPolyReader.c
+core/KinoSearch/Test/Index/TestPolyReader.cfh
core/KinoSearch/Test/Index/TestPostingListWriter.c
core/KinoSearch/Test/Index/TestPostingListWriter.cfh
core/KinoSearch/Test/Index/TestSegment.c
@@ -450,6 +452,8 @@
core/KinoSearch/Test/Plan/TestArchitecture.cfh
core/KinoSearch/Test/Plan/TestBlobType.c
core/KinoSearch/Test/Plan/TestBlobType.cfh
+core/KinoSearch/Test/Plan/TestFieldType.c
+core/KinoSearch/Test/Plan/TestFieldType.cfh
core/KinoSearch/Test/Plan/TestFullTextType.c
core/KinoSearch/Test/Plan/TestFullTextType.cfh
core/KinoSearch/Test/Plan/TestNumericType.c
@@ -1057,9 +1061,11 @@
t/core/221-highlight_writer.t
t/core/222-posting_list_writer.t
t/core/223-seg_writer.t
+t/core/225-polyreader.t
t/core/230-full_text_type.t
t/core/231-blob_type.t
t/core/232-numeric_type.t
+t/core/234-field_type.t
t/core/301-segment.t
t/core/501-termquery.t
t/core/502-phrasequery.t
Modified: trunk/libkinosearch-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/META.yml?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/META.yml (original)
+++ trunk/libkinosearch-perl/META.yml Fri Mar 25 15:09:55 2011
@@ -449,6 +449,8 @@
- core/KinoSearch/Test/Index/TestHighlightWriter.cfh
- core/KinoSearch/Test/Index/TestIndexManager.c
- core/KinoSearch/Test/Index/TestIndexManager.cfh
+ - core/KinoSearch/Test/Index/TestPolyReader.c
+ - core/KinoSearch/Test/Index/TestPolyReader.cfh
- core/KinoSearch/Test/Index/TestPostingListWriter.c
- core/KinoSearch/Test/Index/TestPostingListWriter.cfh
- core/KinoSearch/Test/Index/TestSegWriter.c
@@ -479,6 +481,8 @@
- core/KinoSearch/Test/Plan/TestArchitecture.cfh
- core/KinoSearch/Test/Plan/TestBlobType.c
- core/KinoSearch/Test/Plan/TestBlobType.cfh
+ - core/KinoSearch/Test/Plan/TestFieldType.c
+ - core/KinoSearch/Test/Plan/TestFieldType.cfh
- core/KinoSearch/Test/Plan/TestFullTextType.c
- core/KinoSearch/Test/Plan/TestFullTextType.cfh
- core/KinoSearch/Test/Plan/TestNumericType.c
@@ -987,9 +991,11 @@
- t/core/221-highlight_writer.t
- t/core/222-posting_list_writer.t
- t/core/223-seg_writer.t
+ - t/core/225-polyreader.t
- t/core/230-full_text_type.t
- t/core/231-blob_type.t
- t/core/232-numeric_type.t
+ - t/core/234-field_type.t
- t/core/301-segment.t
- t/core/501-termquery.t
- t/core/502-phrasequery.t
@@ -1052,7 +1058,7 @@
file: lib/KSx/Simple.pm
KinoSearch:
file: lib/KinoSearch.pm
- version: 0.312
+ version: 0.313
KinoSearch::Analysis::Analyzer:
file: lib/KinoSearch/Analysis/Analyzer.pm
KinoSearch::Analysis::CaseFolder:
@@ -1366,4 +1372,4 @@
Parse::RecDescent: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.312
+version: 0.313
Modified: trunk/libkinosearch-perl/core/KinoSearch/Index/PolyReader.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/core/KinoSearch/Index/PolyReader.c?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/core/KinoSearch/Index/PolyReader.c (original)
+++ trunk/libkinosearch-perl/core/KinoSearch/Index/PolyReader.c Fri Mar 25 15:09:55 2011
@@ -469,28 +469,37 @@
uint32_t
PolyReader_sub_tick(I32Array *offsets, int32_t doc_id)
{
- uint32_t lo = 0;
- uint32_t hi_tick = I32Arr_Get_Size(offsets) - 1;
- uint32_t hi = hi_tick;
+ int32_t size = I32Arr_Get_Size(offsets);
+ if (size == 0) {
+ return 0;
+ }
- while (hi >= lo) {
- uint32_t mid = lo + ((hi - lo) / 2);
- int32_t mid_start = I32Arr_Get(offsets, mid) + 1;
- if (doc_id < mid_start) {
- hi = mid - 1;
- }
- else if (doc_id > mid_start) {
- lo = mid + 1;
- }
+ int32_t lo = -1;
+ int32_t hi = size;
+ while (hi - lo > 1) {
+ int32_t mid = lo + ((hi - lo) / 2);
+ int32_t offset = I32Arr_Get(offsets, mid);
+ if (doc_id <= offset) {
+ hi = mid;
+ }
else {
- while ( mid < hi_tick
- && I32Arr_Get(offsets, mid + 1) == mid_start
- ) {
- mid++;
- }
- return mid;
- }
- }
+ lo = mid;
+ }
+ }
+ if (hi == size) {
+ hi--;
+ }
+
+ while (hi > 0) {
+ int32_t offset = I32Arr_Get(offsets, hi);
+ if (doc_id <= offset) {
+ hi--;
+ }
+ else {
+ break;
+ }
+ }
+
return hi;
}
Modified: trunk/libkinosearch-perl/core/KinoSearch/Plan/FieldType.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/core/KinoSearch/Plan/FieldType.c?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/core/KinoSearch/Plan/FieldType.c (original)
+++ trunk/libkinosearch-perl/core/KinoSearch/Plan/FieldType.c Fri Mar 25 15:09:55 2011
@@ -71,6 +71,7 @@
{
FieldType *evil_twin = (FieldType*)other;
if (evil_twin == self) return true;
+ if (FType_Get_VTable(self) != FType_Get_VTable(evil_twin)) return false;
if (self->boost != evil_twin->boost) return false;
if (!!self->indexed != !!evil_twin->indexed) return false;
if (!!self->stored != !!evil_twin->stored) return false;
Modified: trunk/libkinosearch-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/debian/changelog?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/debian/changelog (original)
+++ trunk/libkinosearch-perl/debian/changelog Fri Mar 25 15:09:55 2011
@@ -1,4 +1,4 @@
-libkinosearch-perl (0.312-1) unstable; urgency=low
+libkinosearch-perl (0.313-1) UNRELEASED; urgency=low
* New upstream release
+ Updated package (build-)dependencies accordingly
Modified: trunk/libkinosearch-perl/lib/KinoSearch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/lib/KinoSearch.pm?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/lib/KinoSearch.pm (original)
+++ trunk/libkinosearch-perl/lib/KinoSearch.pm Fri Mar 25 15:09:55 2011
@@ -6,12 +6,12 @@
use 5.008003;
use Exporter;
-our $VERSION = '0.312';
+our $VERSION = '0.313';
$VERSION = eval $VERSION;
use XSLoader;
# This loads a large number of disparate subs.
-BEGIN { XSLoader::load( 'KinoSearch', '0.312' ) }
+BEGIN { XSLoader::load( 'KinoSearch', '0.313' ) }
BEGIN {
push our @ISA, 'Exporter';
Modified: trunk/libkinosearch-perl/lib/KinoSearch.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/lib/KinoSearch.pod?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/lib/KinoSearch.pod (original)
+++ trunk/libkinosearch-perl/lib/KinoSearch.pod Fri Mar 25 15:09:55 2011
@@ -4,7 +4,7 @@
=head1 VERSION
-0.312
+0.313
=head1 SYNOPSIS
Modified: trunk/libkinosearch-perl/lib/KinoSearch/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/lib/KinoSearch/Test.pm?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/lib/KinoSearch/Test.pm (original)
+++ trunk/libkinosearch-perl/lib/KinoSearch/Test.pm Fri Mar 25 15:09:55 2011
@@ -63,6 +63,9 @@
else if (strEQ(package, "TestBlobType")) {
kino_TestBlobType_run_tests();
}
+ else if (strEQ(package, "TestFieldType")) {
+ kino_TestFType_run_tests();
+ }
else if (strEQ(package, "TestFullTextType")) {
kino_TestFullTextType_run_tests();
}
@@ -81,6 +84,9 @@
}
else if (strEQ(package, "TestIndexManager")) {
kino_TestIxManager_run_tests();
+ }
+ else if (strEQ(package, "TestPolyReader")) {
+ kino_TestPolyReader_run_tests();
}
else if (strEQ(package, "TestPostingListWriter")) {
kino_TestPListWriter_run_tests();
Modified: trunk/libkinosearch-perl/t/binding/702-sample.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libkinosearch-perl/t/binding/702-sample.t?rev=71976&op=diff
==============================================================================
--- trunk/libkinosearch-perl/t/binding/702-sample.t (original)
+++ trunk/libkinosearch-perl/t/binding/702-sample.t Fri Mar 25 15:09:55 2011
@@ -1,20 +1,19 @@
use strict;
use warnings;
use lib 'buildlib';
-use Test::More;
+use Test::More tests => 1;
use File::Spec::Functions qw( catfile catdir );
use File::Path qw( rmtree );
-system("$^X -MJSON::XS -e1");
-if ($?) {
- plan( skip_all => 'complicated @INC issue' );
-}
-else {
- plan( tests => 1 );
-}
-
my $search_cgi_orig_path = catfile(qw( sample search.cgi ));
my $indexer_pl_orig_path = catfile(qw( sample indexer.pl ));
+
+# Ensure that all @INC dirs make it into the scripts. We can't use PERL5LIB
+# because search.cgi runs with taint mode and environment vars are tainted.
+my $blib_arch = catdir(qw( blib arch ));
+my $blib_lib = catdir(qw( blib lib ));
+my @inc_dirs = map {"use lib '$_';"} ( $blib_arch, $blib_lib, @INC );
+my $use_dirs = join( "\n", @inc_dirs );
for my $filename (qw( search.cgi indexer.pl )) {
my $orig_path = catfile( 'sample', $filename );
@@ -25,10 +24,7 @@
or die "no match";
my $uscon_source = catdir(qw( sample us_constitution ));
$content =~ s/(uscon_source\s+=\s+).*?;/$1'$uscon_source';/;
- my $blib_arch = catdir(qw( blib arch ));
- my $blib_lib = catdir(qw( blib lib ));
- my $blib = "use lib '$blib_arch';\nuse lib '$blib_lib'\n";
- $content =~ s/^use/$blib;\nuse/m;
+ $content =~ s/^use/$use_dirs;\nuse/m;
open( $fh, '>', "_$filename" ) or die $!;
print $fh $content;
close $fh or die "Close failed: $!";
More information about the Pkg-perl-cvs-commits
mailing list