1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/mysql-test/suite
Hemant Dangi 88d43afd33 MDEV-37366: Inconsistency detected - create sequence
Issue:

When applying 'SELECT NEXT VALUE..' on applier node with
binlog_row_image=MINIMAL and log-binlog enabled, applier
node fails with below error:

Slave SQL: Could not execute Write_rows_v1 event on table monitor.seq_moni_num; Unknown error, Error_code: 1105; handler error No Error!; the event's master log FIRST, end_log_pos 0, Internal MariaDB error code: 1105

To reproduce run below command on the first/active node:

> CREATE SEQUENCE `seq_test` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
> SELECT NEXT VALUE FOR seq_test;
> SELECT NEXT VALUE FOR seq_test;

The applier node will leave the cluster after executing
the 'SELECT NEXT VALUE' with below error:

ERROR] Slave SQL: Could not execute Write_rows_v1 event on table test.seq_test; Unknown error, Error_code: 1105; handler error No Error!; the event's master log FIRST, end_log_pos 0, Internal MariaDB error code: 1105
[Warning] WSREP: Event 3 Write_rows_v1 apply failed: 195, seqno 14511334511

Solution:

When binary loggging is enabled and binlog_row_image is set to
'MINIMAL', then 'SELECT NEXT VALUE' fails to apply on applier node.
It fails with error HA_ERR_SEQUENCE_INVALID_DATA 195 in
sequence_definition::check_and_adjust() because sequence variables
like min_value, max_value, start are 0.

The marking of all columns in 'TABLE::mark_columns_per_binlog_row_image()'
will prevent update/set column values for the sequence table.
For the sequence table column bitmap sent from master is only used.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-08-13 21:01:19 +02:00
..
2025-01-29 11:17:38 +01:00
2025-03-26 17:09:57 +02:00
2025-01-29 11:17:38 +01:00
2025-03-26 17:09:57 +02:00
2025-04-02 04:43:24 +02:00
2025-04-21 10:43:17 +02:00
2025-01-20 09:57:37 +02:00
2025-01-29 11:17:38 +01:00
2025-03-26 17:09:57 +02:00
2025-04-21 10:43:17 +02:00
2025-01-20 09:57:37 +02:00
2025-07-25 16:04:10 +02:00