openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Gianni (JIRA)" <>
Subject [jira] Updated: (OPENJPA-740) In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data.
Date Wed, 08 Apr 2009 16:54:12 GMT


Simone Gianni updated OPENJPA-740:

    Attachment: OPENJPA-740-mysqlblob.patch

This patchs uses the right column table for mysql based on the size specified for the column.
I had this patch for a few months now, but no one told me how to test it in junit, so unfortunately
I haven't provided a junit test case for it.

Sice this patch is old, I don't know if it still applies to recent OpenJPA versions. If I
have time to, I'll do a fresh checkout and test it.

> In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data.
> ----------------------------------------------------------------------------------------
>                 Key: OPENJPA-740
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: sql
>    Affects Versions: 1.2.0
>            Reporter: Simone Gianni
>         Attachments: OPENJPA-740-mysqlblob.patch
> When a column is annotated as a BLOB of using @Persistent to use streaming blobs, and
the underlying database is MySQL, OpenJPA will create a column of type BLOB. Unfortunately,
in MySQL a BLOB column can hold a (vary) limited amount of data, while (especially when using
streaming blobs) the user would probably expect it to hold a large amount of data.
> Also adding the @Column annotation and specifying a size bigger than what a BLOB column
in MySQL can hold, OpenJPA still creates only a BLOB column.
> I think OpenJPA should be able to create the proper column type depending on the @Column
annotation if present, or otherwise default at least to a MEDIUMBLOB to preserve cross-database
compatibility as expected.
> The simplest patch i can think of is setting blobTypeName="MEDIUMBLOB" in the MySQLDictionary
> Otherwise, overriding the getTypeName to properly parse the length and return the correct
BLOB/TEXT type for mysql.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message