bamaer commented on code in PR #9484:
URL: https://github.com/apache/hop/pull/9484#discussion_r4573868135
##########
plugins/databases/mariadb/src/main/java/org/apache/hop/databases/mariadb/MariaDBDatabaseMeta.java:
##########
@@ -89,6 +93,67 @@ public boolean isFullExceptionLog(Exception e) {
return !(cause != null &&
SHORT_MESSAGE_EXCEPTIONS.contains(cause.getClass().getName()));
}
+ /** MariaDB supports sequences natively since 10.3, unlike MySQL. */
+ @Override
+ public boolean isSupportsSequences() {
Review Comment:
**Should fix**
With sequences enabled, the SQL button in Dimension lookup and Combination
lookup now generates a `CREATE SEQUENCE` for MariaDB. They pass max value `-1`
("no maximum"), and since MariaDB doesn't report a no-max-value option, the
statement ends in `MAXVALUE -1`. MariaDB rejects it:
```
ERROR 4085 (HY000): Sequence 'hop.dim_seq' has out of range value for options
```
MariaDB accepts `NOMAXVALUE`, which
`BaseDatabaseMeta.getSequenceNoMaxValueOption()` already returns, so this
override is enough:
```java
@Override
public boolean isSupportsSequenceNoMaxValueOption() {
return true;
}
```
We tried it: the generated DDL ends in `NOMAXVALUE`, runs on MariaDB 10.11,
and `NEXTVAL` returns 1. An assertion on `isSupportsSequenceNoMaxValueOption()`
in `MariaDBSequenceAndReleaseSavePointTest` would cover it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]