openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milosz Tylenda (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-740) In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data.
Date Mon, 08 Mar 2010 19:48:27 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842795#action_12842795
] 

Milosz Tylenda commented on OPENJPA-740:
----------------------------------------

Donald, just wondering about the patch - will the column type be correct (i.e. equals the
type specified in blobTypeName public variable) when the size of the column is not specified?


> In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data.
> ----------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-740
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-740
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.2.0, 1.2.1, 1.2.2, 1.3.0, 2.0.0-M3, 2.0.0-beta, 2.0.0-beta2
>            Reporter: Simone Gianni
>            Assignee: Donald Woods
>            Priority: Blocker
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-740-13x.patch, OPENJPA-740-mysqlblob.patch, OPENJPA-740-trunk.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
constructor.
> 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.


Mime
View raw message