lxr-cvs uses wrong syntax in MySQL delete statement

Bug #80894 reported by Florian Zschocke
4
Affects Status Importance Assigned to Milestone
lxr-cvs (Debian)
Fix Released
Unknown
lxr-cvs (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: lxr-cvs

The genxref program from lxr-cvs produces errors when used with the --reindexall option.

To reproduce set up an LXR inastallation and run
genxref --url=http://localhost/lxr --allversions --reindexall

Output:
DBD::mysql::st execute failed: Unknown table 'lxr_indexes' in MULTI DELETE at /usr/share/perl5/LXR/Index/Mysql.pm line 334.
DBD::mysql::st execute failed: Unknown table 'lxr_useage' in MULTI DELETE at /usr/share/perl5/LXR/Index/Mysql.pm line 335.
DBD::mysql::st execute failed: Unknown table 'lxr_status' in MULTI DELETE at /usr/share/perl5/LXR/Index/Mysql.pm line 336.
DBD::mysql::st execute failed: Unknown table 'lxr_files' in MULTI DELETE at /usr/share/perl5/LXR/Index/Mysql.pm line 338.

The problem lies with the MySQL statements used for "delete_indexes", "delete_useage", "delete_status" and "delete_files" in /usr/share/perl5/LXR/Index/Mysql.pm.

Between lines 114 and 131 the statements are defines as
"delete from ${prefix}indexes using ${prefix}indexes i, ${prefix}releases r where ...".
This is not working and according to the MySQL manual not correct syntax. Since aliases are used, the alias has to be used with DELETE, too. The correct synax would be:
"delete from i using ${prefix}indexes i, ${prefix}releases r where ..."

Changed in lxr-cvs:
status: Unknown → Unconfirmed
Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

I found I had to make that change, plus rename the "lxr_releases.release" field to "lxr_release.xrelease" in both the initdb-mysql and the /usr/share/perl5/LXR/Index/Mysql.pm file.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 alpha?

Changed in lxr-cvs:
status: New → Incomplete
Revision history for this message
Andreas Moog (ampelbein) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in lxr-cvs (Ubuntu):
status: Incomplete → Invalid
Changed in lxr-cvs (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.