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

ASF subversion and git services commented on OPENJPA-3062:
----------------------------------------------------------

Commit 1ebd6212593298385976b7b4bd90fcdf844fd71d in openjpa's branch 
refs/heads/OPENJPA-3063 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=1ebd62125 ]

[OPENJPA-3062] Keep the fraction of unsized decimal columns on MySQL and 
MariaDB (#263)

* [OPENJPA-3062] Keep the fraction of unsized decimal columns on MySQL and 
MariaDB

MySQL and MariaDB read an unsized DECIMAL or NUMERIC as DECIMAL(10,0), so
a BigDecimal attribute without a precision was rounded to an integer.
Create such a column of a non integral Java type as NUMERIC(65, scale),
with scale 30 if the mapping gives none, unless NumericTypeName or
DecimalTypeName was configured or a columnDefinition is used. Keep the
precision and scale of DECIMAL columns as for NUMERIC. Move the check
for an unsized decimal column from H2Dictionary to DBDictionary.

* [OPENJPA-3062] Compare the MySQL result of NULLIF on a timestamp as a 
timestamp

The type of NULLIF over a timestamp field and a JDBC escape is not known,
so the value of the driver is returned as it is. MySQL 8.4 returns the
text of the timestamp and MySQL 9 a LocalDateTime. Compare these as the
timestamp they stand for in TestInMemoryJDBCEscapeLiterals.

> MySQL and MariaDB: a decimal column without a precision rounds values to 
> integers
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-3062
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3062
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to