EPrints Technical Mailing List Archive

Message: #01335

< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Counting eprints in subject tree

Dear all,

after migrated to 3.3.10 we noticed that counting eprints column in the subject tree was alwais 0 (this wasn't too bad as counting is dramaticaly slow :-) ). After a lot of debugging, we noticed that this happens if you create a subject with the parameter "multiple=>0".

Changing the field parameter to "multiple=>1" and making an "epadmin update 'db'" avoid the error (and the subject tree page returns to be vewwy vewwy slow :-) )

If you trace the database query you can see that multiple=>0 parameter generates a broken sql query, something like :

-- piece of sql generated for phd subject
SELECT `eprint`.`eprintid` AS `eprintid`
      `eprint` AS `eprint_834169004`
        `subject_ancestors` AS `834169004subject_ancestors`
ON `eprint_834169004`.`phd` = `834169004subject_ancestors`.`subjectid`
    AND (`834169004subject_ancestors`.`ancestors` = 'ROOT' OR
`834797748subject_ancestors`.`ancestors` = 'ROOT') -- This is broken

Best regards,
Paolo Tealdi

Ing. Paolo Tealdi         Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906799
Indirizzo/Address : C.so Duca degli Abruzzi,  24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this e-mail