You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
against MySQL 8 results in a failure Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OFFSET 0 ROWS FETCH FIRST 30 ROWS ONLY' at line 1.
The reason for that is that TestHelper will always use DefaultJdbcCustomization:
and DefaultJdbcCustomization tries to use ANSI pagination constructs that aren't supported in MySQL.
It would be better to honour jdbcCustomization set on the builder and fall back to AutodetectJdbcCustomization if not set. It would boil down to something like
...
final JdbcCustomization jdbcCustomization =
ofNullable(this.jdbcCustomization)
.orElseGet(
() -> new AutodetectJdbcCustomization(dataSource, alwaysPersistTimestampInUTC));
final JdbcTaskRepository schedulerTaskRepository =
new JdbcTaskRepository(
dataSource,
true,
jdbcCustomization,
tableName,
taskResolver,
new SchedulerName.Fixed("manual"),
serializer,
enablePriority,
clock);
final JdbcTaskRepository clientTaskRepository =
new JdbcTaskRepository(
dataSource,
commitWhenAutocommitDisabled,
jdbcCustomization,
tableName,
taskResolver,
new SchedulerName.Fixed("manual"),
serializer,
enablePriority,
clock);
...
in ManualSchedulerBuilder.build().
I run all tests with this small change and they are all green. @kagkarlsson I can contribute a PR if you are interested. It would be even better to have some (integration) test(s) but that would I think require adding support for running an embedded MySQL instance (similar to what I can see for PostgreSQL).
The text was updated successfully, but these errors were encountered:
Running a following test
against MySQL 8 results in a failure
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OFFSET 0 ROWS FETCH FIRST 30 ROWS ONLY' at line 1
.The reason for that is that
TestHelper
will always useDefaultJdbcCustomization
:and
DefaultJdbcCustomization
tries to use ANSI pagination constructs that aren't supported in MySQL.It would be better to honour
jdbcCustomization
set on the builder and fall back toAutodetectJdbcCustomization
if not set. It would boil down to something likein
ManualSchedulerBuilder.build()
.I run all tests with this small change and they are all green. @kagkarlsson I can contribute a PR if you are interested. It would be even better to have some (integration) test(s) but that would I think require adding support for running an embedded MySQL instance (similar to what I can see for PostgreSQL).
The text was updated successfully, but these errors were encountered: