Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#212 closed defect (released)

xapian-check uses the Quartz format when it should be using Flint

Reported by: Charlie Hull Owned by: New Bugs
Priority: normal Milestone:
Component: MSVC makefiles Version: 1.0.4
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

To reproduce: edit line 122 of quartz\btreecheck.cc:

out << "B-tree error QUARTZ " << n << endl;

Rebuild and run termgentest to create a database in tests\.flint\tg_spell1

Then run xapian-check on this database. The output is as follows:

record: baseB blocksize=8K items=0 lastblock=0 revision=1 levels=0 root=(faked) void B-tree checked okay tg_spell1/record table: Don't know how to check structure

termlist: baseB blocksize=8K items=0 lastblock=0 revision=1 levels=0 root=(faked) void B-tree checked okay tg_spell1/termlist table: Don't know how to check structure

postlist: baseB blocksize=8K items=0 lastblock=0 revision=1 levels=0 root=(faked) void B-tree checked okay tg_spell1/postlist table: Don't know how to check structure

position: Lazily created, and not yet used.

value: Lazily created, and not yet used.

spelling: baseB blocksize=8K items=25 lastblock=0 revision=1 levels=0 root=0 B-tree error QUARTZ 40 xapian-check: btree error

The final lines shows that Quartz is being used where we would expect Flint to be used.

Attachments (1)

patch15.patch (7.1 KB ) - added by Charlie Hull 17 years ago.
Patch to make sure we use the correct backend check code

Download all attachments as: .zip

Change History (7)

comment:1 by Olly Betts, 17 years ago

Component: Backend-FlintMSVC makefiles

You might want to check how you're linking xapian-check in your makefiles...

comment:2 by Richard Boulton, 17 years ago

Ah - I see the problem - it is indeed a problem with how xapian-check is linked in the windows build files.

In the windows build system, in win32_backends_quartz.mak, LIBBTREECHECK.lib is defined, using quartz\btreecheck.obj. This is then added to XAPIAN_LIBS in config.mak.

Instead, LIBBTREECHECK shouldn't be included in XAPIAN_LIBS at all, but should be included only when building quartzcheck. Additionally, a LIBFLINTCHECK (or something similar) should be defined in win32_backends_flint.mak, using flint\flint_check.cc, and be included when building xapian-check.

flint_check.cc isn't currently mentioned in the windows build files, so it's not really odd that changing it has no effect.

comment:3 by Olly Betts, 17 years ago

Blocking: 200 added

Sigh, having two parallel make systems really sucks.

Can you fix this for the next release (sometime in December)?

Note that btreetest also uses the quartz btree checking code.

by Charlie Hull, 17 years ago

Attachment: patch15.patch added

Patch to make sure we use the correct backend check code

comment:4 by Olly Betts, 17 years ago

Resolution: fixed
Status: newclosed

Applied.

btreetest is quartz-specific (see tests/Makefile.am).

comment:5 by Olly Betts, 17 years ago

Resolution: fixedreleased

comment:6 by Olly Betts, 17 years ago

Blocking: 200 removed
Operating System: Microsoft Windows
Note: See TracTickets for help on using tickets.