[EP-tech] Longtext field: maxlength

John Salter J.Salter at leeds.ac.uk
Tue Apr 26 10:30:48 BST 2016

> The wiki documentation
Before someone says' yes it does', I've just updated the wiki with this detail :o)

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of John Salter
Sent: 26 April 2016 10:15
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Longtext field: maxlength

Just discovered something that might be useful for others to know:
An EPrints longtext field has a default max character length of 65535 (quite a bit shorter than a database longtext field).

The wiki documentation for a longtext field doesn't mention this default limit.

As this is a default, it can be overridden in the repository config for a field:
        name => 'referencetext',
        type => 'longtext',
        input_rows => 15,
        maxlength => 120000, #MySQL longtext can theoretically handle 4G?

Hope that helps someone in the future - someone just uploaded a thesis with 90,000 bytes of reference text - which is how I discovered this!

*** 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/

More information about the Eprints-tech mailing list