Ticket #3653 (closed defect: invalid)

Opened 4 years ago

Last modified 3 years ago

Browse view on multiple fields generates bad MYSQL

Reported by: af05v@… Owned by: tdb01r
Priority: Must do Milestone: 3.2.5
Component: Indexer & Search Version: 3.1
Severity: major Keywords:
Cc:

Description

view definition includes:

fields => "creators_id/editors_id",

Generates:

SELECT DISTINCT eprint.eprintid,eprint.appears_on_cv FROM eprint_editors_id,eprint_creators_id,eprint WHERE eprint.eprint_status = 'archive' AND ((eprint_creators_id.creators_id = )) OR ((eprint_editors_id.editors_id = )) AND eprint.eprintid = eprint_editors_id.eprintid AND eprint.eprintid = eprint_creators_id.eprintid;

Note no brackets around the OR:

((eprint_creators_id.creators_id = )) OR ((eprint_editors_id.editors_id = ))

Should be:

((eprint_creators_id.creators_id = ) OR (eprint_editors_id.editors_id = ))

Change History

Changed 4 years ago by cjg

  • owner set to tdb01r
  • component changed from - to Indexer & Search
  • milestone changed from EPrints 3.2.x (general bugs/features for 3.2) to EPrints 3.2.0

Changed 4 years ago by tdb01r

  • version set to 3.1
  • milestone changed from EPrints 3.2.0 to EPrints 3.1.4

Changed 3 years ago by tdb01r

  • status changed from new to closed
  • resolution set to invalid

The constructed SQL is now completely different in 3.2+.

Note: See TracTickets for help on using tickets.