We are using lxr-0.9.2 currently. We have a huge source
tree which has about 100,000 files. While we are creating
the database with 'genxref', we notice that there are
about 100 files are not referenced, but the 'genxref'
says "already referenced". When we search the
"files" table for the files with the problem, we found those
files has duplicated 'files' entries. We believe the problem
is the second files entry is used, but it has no "status"
entry and will be given "already referenced".
The problem is why there are duplicated 'files' entries?
We are using the mysql 4.1.7. The 'fileid' function
from Mysql.pl is called before creating the
reference. The function run "select" query to
get fileid, if it fails then create a new files entry.
I think this might be the reason for the duplicated
'files' entries. For the reason that "select" command
failed to find an existing files entry? I don't know.
But I think the script should avoid to create
duplicated 'files' entries.
I also looked into the lxr-0.9.4 code. With lxr-0.9.4,
it is still possible to create duplicated 'files' entries,
but it might create reference for the second file
entry. What the database will become? I am not sure.
It might not do better than lxr-0.9.2 on this.