Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MySQL and ERAttachmentData BLOB size

Note

This shouldn't be necessary anymore. If your data column will be created as BLOB instead of LONGBLOB you should check your connection settings. You should have set the used prototypes either globally with dbEOPrototypesEntityGLOBAL=EOJDBCMySQLPrototypes or just for your attachment model with ERAttachment.EOPrototypesEntity=EOJDBCMySQLPrototypes.

The prototype for ERAttachmentData.data is 'blob', and the blob proto for MySQL is BLOB when it should really be LONGBLOB. In MySQL a BLOB is on 65K+, a MEDIUMBLOB is up to 64MB and a LONGBLOB is up to 4GB. FrontBase, for example, has only one type, BLOB for binary large objects and it is defined as 4GB (4^32 bytes). So if you don't want to think about it, then use LONGBLOB in MySQL. If you want to limit the size of what someone can upload and 64MB is the biggest attachment you ever want to be accepted into the database, use MEDIUMBLOB.

...

Code Block
ALTER TABLE ERAttachmentData MODIFY data MEDIUMBLOB;

or

ALTER TABLE ERAttachmentData MODIFY data LONGBLOB;

...