Skip to content

Commit 24ebf71

Browse files
committed
[OPENJPA-2940] Add transformedBitIsBoolean=true to MySQL JDBC test URL
MySQL stores BOOLEAN columns as TINYINT(1). By default, MySQL Connector/J reports them as Types.BIT, which OpenJPA's MappingInfo.mergeColumn coerces as "numeric" and silently upgrades to VARCHAR — defeating SchemaManager.validate() detection of a genuine VARCHAR->BOOLEAN schema drift (TestJDBCSchemaManager.testValidate). Setting transformedBitIsBoolean=true makes Connector/J report TINYINT(1) as Types.BOOLEAN, which isNumericType() excludes. This matches MariaDB Connector/J's default behavior where the same test already passes.
1 parent 6613f8d commit 24ebf71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@
651651
<!-- default settings for local docker -->
652652
<docker.external.mysql.port>3306</docker.external.mysql.port>
653653
<openjpa.mysql.dbname>openjpatst</openjpa.mysql.dbname>
654-
<openjpa.mysql.url>jdbc:mysql://localhost:${docker.external.mysql.port}/${openjpa.mysql.dbname}?useSSL=false</openjpa.mysql.url>
654+
<openjpa.mysql.url>jdbc:mysql://localhost:${docker.external.mysql.port}/${openjpa.mysql.dbname}?useSSL=false&amp;transformedBitIsBoolean=true</openjpa.mysql.url>
655655
<openjpa.mysql.username>openjpatst</openjpa.mysql.username>
656656
<openjpa.mysql.password>openjpatst</openjpa.mysql.password>
657657

0 commit comments

Comments
 (0)