You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2018/11/02 09:38:00 UTC

[jira] [Commented] (OPENJPA-2567) TINY/MEDIUM/LONG TEXT fields for MySQL and MariaDB are not supported

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

Mark Struberg commented on OPENJPA-2567:
----------------------------------------

Folks, I have a question.

I get a test failure in {{testClobColumnType#testDefaultLob}}
{noformat}
Expected :BLOB
Actual   :TEXT
	at org.apache.openjpa.persistence.blob.mysql.TestClobColumnType.testDefaultLob(TestClobColumnType.java:92)
{noformat}

This appears legit to me!
I test with -Ptest-mysql-docker which right now defaults to mysql-5.7.
Which version did you do your tests with?

Afaik a {{@Lob}} on a String leads to TEXT (or TINYTEXT, MEDIUMTEXT, LONGTEXT depending on the {{@Column(length=n)}}).
But only a {{@Lob}} on a byte[] leads to BLOB (or variants depending on the length again).
See https://dev.mysql.com/doc/refman/5.7/en/blob.html

> TINY/MEDIUM/LONG TEXT fields for MySQL and MariaDB are not supported
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-2567
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2567
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.3.0
>            Reporter: Maxim Solodovnik
>            Assignee: Francesco Chicchiriccò
>            Priority: Major
>             Fix For: 2.4.4, 3.0.1
>
>         Attachments: text_fields_3.patch
>
>
> All string fields annotated with @Lob are being created in MySQL DB as "TEXT" no matter of length
> Attached patch fixes this for trunk



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)