Skip to content

Commit a61da10

Browse files
Selaronbeikov
authored andcommitted
HHH-19097 Implemented MySQLLegacyDialect#stripsTrailingSpacesFromChar
1 parent 05d44ea commit a61da10

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/MySQLLegacyDialect.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ protected String columnType(int sqlTypeCode) {
240240
}
241241
}
242242

243+
/**
244+
* MySQL strips any trailing space character from a
245+
* value stored in a column of type {@code char(n)}.
246+
* @return {@code true}
247+
*/
248+
@Override
249+
public boolean stripsTrailingSpacesFromChar() {
250+
return true;
251+
}
252+
243253
@Override
244254
public boolean useMaterializedLobWhenCapacityExceeded() {
245255
// MySQL has no real concept of LOBs, so we can just use longtext/longblob with the materialized JDBC APIs

0 commit comments

Comments
 (0)