Skip to content

Commit 87b34ba

Browse files
committed
HHH-19228 upgrade mysql testing version to 9.2
1 parent d539bc4 commit 87b34ba

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

docker_db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ mysql_8_2() {
9393

9494
mysql_9_2() {
9595
$CONTAINER_CLI rm -f mysql || true
96-
$CONTAINER_CLI run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d ${DB_IMAGE_MYSQL_9_2:-docker.io/mysql:9.2.0} --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_as_cs --init-connect="SET NAMES 'utf8mb4';" --log-bin-trust-function-creators=1 --lower_case_table_names=2
96+
$CONTAINER_CLI run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d ${DB_IMAGE_MYSQL_9_2:-docker.io/mysql:9.2.0} --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_as_cs --init-connect="SET character_set_client= 'utf8mb4';SET character_set_results = 'utf8mb4'; SET character_set_connection= 'utf8mb4'; SET collation_connection = 'utf8mb4_0900_as_cs';" --log-bin-trust-function-creators=1 --lower_case_table_names=2
9797
# Give the container some time to start
9898
OUTPUT=
9999
n=0

hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaOrderedSetAggregateTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import org.hibernate.dialect.CockroachDialect;
1212
import org.hibernate.dialect.H2Dialect;
13+
import org.hibernate.dialect.MySQLDialect;
1314
import org.hibernate.dialect.PostgreSQLDialect;
1415
import org.hibernate.dialect.PostgresPlusDialect;
1516
import org.hibernate.query.criteria.HibernateCriteriaBuilder;
@@ -198,8 +199,14 @@ public void testListaggWithFilterAndWindow(SessionFactoryScope scope) {
198199
} );
199200
}
200201

202+
/*
203+
* Skipped for MySQL 9.2: The test fails due to a regression in MySQL 9.2, which no longer supports NULLS FIRST/LAST in ORDER BY within LISTAGG as expected.
204+
* See https://bugs.mysql.com/bug.php?id=117765 for more details.
205+
* This is a MySQL issue, not a problem in the dialect implementation.
206+
*/
201207
@Test
202208
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsStringAggregation.class)
209+
@SkipForDialect(dialectClass = MySQLDialect.class, majorVersion = 9, minorVersion = 2, reason = "https://bugs.mysql.com/bug.php?id=117765")
203210
public void testListaggWithNullsClause(SessionFactoryScope scope) {
204211
scope.inTransaction( session -> {
205212
HibernateCriteriaBuilder cb = session.getCriteriaBuilder();

hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/OrderedSetAggregateTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.Date;
99
import java.util.List;
1010

11+
import org.hibernate.dialect.MySQLDialect;
1112
import org.hibernate.testing.orm.junit.JiraKey;
1213
import org.hibernate.testing.orm.domain.StandardDomainModel;
1314
import org.hibernate.testing.orm.domain.gambit.EntityOfBasics;
@@ -17,6 +18,7 @@
1718
import org.hibernate.testing.orm.junit.ServiceRegistry;
1819
import org.hibernate.testing.orm.junit.SessionFactory;
1920
import org.hibernate.testing.orm.junit.SessionFactoryScope;
21+
import org.hibernate.testing.orm.junit.SkipForDialect;
2022
import org.junit.jupiter.api.AfterEach;
2123
import org.junit.jupiter.api.BeforeEach;
2224
import org.junit.jupiter.api.Test;
@@ -135,9 +137,15 @@ public void testListaggWithFilter(SessionFactoryScope scope) {
135137
);
136138
}
137139

140+
/*
141+
* Skipped for MySQL 9.2: The test fails due to a regression in MySQL 9.2, which no longer supports NULLS FIRST/LAST in ORDER BY within LISTAGG as expected.
142+
* See https://bugs.mysql.com/bug.php?id=117765 for more details.
143+
* This is a MySQL issue, not a problem in the dialect implementation.
144+
*/
138145
@Test
139146
@JiraKey( value = "HHH-15360")
140147
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsStringAggregation.class)
148+
@SkipForDialect(dialectClass = MySQLDialect.class, majorVersion = 9, minorVersion = 2, reason = "https://bugs.mysql.com/bug.php?id=117765")
141149
public void testListaggWithNullsClause(SessionFactoryScope scope) {
142150
scope.inTransaction(
143151
session -> {

0 commit comments

Comments
 (0)