Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6.13
-
OS: Three Almalinux 9 servers running MariaDB 10.6.13 version with galera-4-26.4.14-1
Description
After upgrading our Almalinux 9 Mariadb servers to the latest lts version ( 10.6.13 ) we got the following error when we apply a simple alter table patch:
ERROR: Unable to release MySQL named lock: Flyway--1574291248 |
java.sql.SQLSyntaxErrorException: (conn=279023) This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' |
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:62) |
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:153) |
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:274) |
at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:229) |
at org.mariadb.jdbc.ClientSidePreparedStatement.execute(ClientSidePreparedStatement.java:149) |
at org.flywaydb.core.internal.jdbc.JdbcTemplate.execute(JdbcTemplate.java:182) |
at org.flywaydb.database.mysql.MySQLNamedLockTemplate.execute(MySQLNamedLockTemplate.java:71) |
at org.flywaydb.database.mysql.MySQLConnection.lock(MySQLConnection.java:152) |
at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:143) |
at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:141) |
at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:98) |
at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:176) |
at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:204) |
at org.flywaydb.core.Flyway.migrate(Flyway.java:128) |
at org.flywaydb.commandline.Main.executeOperation(Main.java:275) |
at org.flywaydb.commandline.Main.main(Main.java:183) |
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' |
at org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(MariaDbSqlException.java:34) |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:192) |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:175) |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:319) |
at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:220) |
... 12 more |
Caused by: java.sql.SQLException: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1681) |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1543) |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1506) |
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:316) |
... 13 more |
ERROR: Unable to acquire MySQL named lock: Flyway--1574291248 |
------------------------------------------------------
|
SQL State : 42000 |
Error Code : 1235 |
Message : (conn=279023) This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' |
Caused by: java.sql.SQLSyntaxErrorException: (conn=279023) This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' |
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' |
Caused by: java.sql.SQLException: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' |
When we downgrade to the previous lts version ( 10.6.12 ) everthing works fine again.
Downgrading to the previous minor version ( dnf downgrade MariaDB-client MariaDB-common MariaDB-server MariaDB-shared ). Only MariaDB packages have changed not galera.
Also the problem occured when we used Flyway `9.2.2` version. Then we upgrade the `flyway` version to the latest one (9.18.0) but still the same error message. We got nothing from the /var/lib/mysql/mysqld.log .
Below you can see the sql queries (create, insert, alter, rename, drop) that we want to migrate using flyway and all of them failed with the same above error on MariaDB version `10.6.13` but work as expected on `10.6.12` version
# cat V26_1__insert_debug.sql
|
INSERT INTO `failed_thingie` (`failed_id`) VALUES
|
(1), |
(2), |
(3), |
(4), |
(5); |
|
|
# cat V26_2__alter_debug.sql
|
ALTER TABLE
|
`failed_thingie`
|
ADD COLUMN
|
`failed_version` VARCHAR(10) NOT NULL DEFAULT '10.6.13' |
AFTER
|
`date`;
|
|
# cat V26_3__rename_debug.sql
|
rename table failed_thingie to failed_mariadb_version
|
|
|
# cat V26_4__drop_debug.sql
|
DROP TABLE IF EXISTS `failed_mariadb_version`;
|
Last, when we run the above sql queries manually from a MariaDB server they all worked so the problem seems to be when those patches are applied from flyway.
Attachments
Issue Links
- is caused by
-
MDEV-30473 Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
- Closed
- is duplicated by
-
MDEV-30967 sst mariabackup broken on rocksdb - cannot GET_LOCK
- Closed
-
MDEV-31388 Error in PROCEDURE in v.10.6.13 with RELEASE_LOCK
- Closed