EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07667
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Broken Eprints filter function
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "Stefan Wellsandt" <wel@biba.uni-bremen.de>
- Subject: Re: [EP-tech] Broken Eprints filter function
- From: "Newman D.R." <drn@ecs.soton.ac.uk>
- Date: Tue, 29 Jan 2019 12:30:34 +0000
Hi Stefan,
I think I have experienced a similar problem in the past. Are you using MariaDB, which is a fork or MySQL rather than MySQL itself? If so there is this known issue which would lead to the problem you report:
I have made a change to perl_lib/EPrints/Database/mysql.pm to fix this (around line 399):
- $sql .= " FROM ($select_sql) ".$self->quote_identifier( "S" );
+ # MariaDB does not order sub-queries unless limited. Using limit of 2^31-1 in case any system is using a signed 32-bit integer.+ my $limit = " LIMIT 2147483647"; + $limit = "" if $select_sql =~ /LIMIT/; + $sql .= " FROM ($select_sql$limit) ".$self->quote_identifier( "S" );
Reviewing this now, the regex check for if LIMIT is set is a little
hacky, so it may be worth checking for / LIMIT / rather than just
/LIMIT/ to rule out any chance that a search term that includes the
sub-string LIMIT might getting passed through. However, I think it is likely that
any search terms would have already been lower-cased before this point.
They will certainly be quoted as individual words, so / LIMIT / will definitively
check if the SQL LIMIT subcommand is already used.
Regards
David Newman
On Tue, 2019-01-29 at 11:58 +0000, Stefan Wellsandt via Eprints-tech wrote:
Hello,I encountered a problem with the filter function in the “Manage Eprints” administrator interface of our institute’s repository (v3.3). Typically, I would be able to filter by id, name or any of the columns I visualize (works for users, for instance).However, for some reason it does not work for Eprints. I can filter by ID, but any of the other filters shows no effect. I assume I changed some configuration to make it break. Has anyone an idea, which configuration file could be the cause of this behavior?Best regardsStefan*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech*** Archive: http://www.eprints.org/tech.php/*** EPrints community wiki: http://wiki.eprints.org/*** EPrints developers Forum: http://forum.eprints.org/
- References:
- [EP-tech] Broken Eprints filter function
- From: Stefan Wellsandt <wel@biba.uni-bremen.de>
- [EP-tech] Broken Eprints filter function
- Prev by Date: [EP-tech] Broken Eprints filter function
- Next by Date: [EP-tech] Workflows involving other users
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):