1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/sql
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
..
2024-08-12 09:32:30 +01:00
2024-11-29 12:37:46 +02:00
2024-01-17 13:35:05 +02:00
2023-01-27 13:54:14 +01:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-10-29 14:20:03 +01:00
2025-01-29 11:17:38 +01:00
2025-04-15 01:49:48 +02:00
2023-12-17 11:20:43 +01:00
2025-07-21 08:59:08 +02:00
2025-07-21 08:59:08 +02:00
2025-02-27 04:02:33 +01:00
2023-02-10 12:02:11 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-07-16 15:54:22 +08:00
2024-07-16 15:54:22 +08:00
2025-01-29 11:17:38 +01:00
2025-01-29 11:17:38 +01:00
2025-04-26 10:41:52 +02:00
2025-01-09 10:15:53 +01:00
2025-01-09 10:15:53 +01:00
2024-11-29 12:37:46 +02:00
2024-07-16 15:54:22 +08:00
2024-11-29 12:37:46 +02:00
2023-11-08 15:57:05 +01:00
2024-06-26 09:16:54 +08:00
2024-06-24 13:09:47 +03:00
2025-04-02 04:43:24 +02:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-05-30 14:27:07 +03:00
2023-02-10 13:03:01 +02:00
2024-11-29 12:37:46 +02:00
2024-10-29 14:20:03 +01:00
2024-06-24 13:09:47 +03:00
2024-01-17 13:35:05 +02:00
2022-10-02 22:14:21 +02:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2023-02-10 12:02:11 +02:00
2022-10-25 14:25:42 +03:00
2024-07-16 15:54:22 +08:00
2023-12-17 11:20:43 +01:00
2023-12-17 11:20:43 +01:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2025-01-20 09:57:37 +02:00
2023-08-01 15:08:52 +02:00
2023-02-10 12:02:11 +02:00
2024-11-29 12:37:46 +02:00
2024-05-08 20:06:00 +02:00
2025-01-29 11:17:38 +01:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-12-04 18:22:31 +03:00
2023-05-02 10:09:27 +02:00
2024-11-23 08:14:22 -07:00
2025-01-20 09:57:37 +02:00
2023-11-08 15:57:05 +01:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2022-12-13 16:58:58 +02:00
2024-06-24 13:09:47 +03:00
2024-12-05 09:20:36 +01:00
2024-06-24 13:09:47 +03:00
2025-01-29 11:17:38 +01:00
2025-01-20 09:57:37 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2025-04-26 10:41:52 +02:00
2024-01-17 13:35:05 +02:00
2023-02-10 12:02:11 +02:00
2025-04-26 10:41:52 +02:00
2024-11-23 08:14:22 -07:00
2024-11-29 12:37:46 +02:00
2024-01-11 12:59:22 +11:00
2024-01-10 18:01:46 +11:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2023-02-10 13:03:01 +02:00
2024-08-03 09:04:24 +02:00
2025-01-09 10:15:53 +01:00
2024-08-20 09:11:34 +02:00
2024-07-16 15:54:22 +08:00
2024-07-16 15:54:22 +08:00
2024-02-12 11:38:13 +02:00
2024-12-17 11:06:09 +11:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00
2025-04-26 10:41:52 +02:00
2023-05-23 12:25:39 +03:00
2024-11-29 12:37:46 +02:00
2025-01-20 09:57:37 +02:00
2024-06-05 14:06:16 +10:00
2024-04-15 18:54:30 +02:00
2025-04-21 10:43:17 +02:00
2025-01-20 09:57:37 +02:00
2024-07-03 12:45:30 +02:00
2025-01-20 09:57:37 +02:00
2023-08-04 07:52:54 +02:00
2025-01-20 09:57:37 +02:00
2023-12-17 11:20:43 +01:00
2023-12-17 11:20:43 +01:00
2025-04-21 10:43:17 +02:00
2023-12-02 01:02:50 +01:00
2024-12-17 11:06:09 +11:00
2024-11-29 12:37:46 +02:00
2024-03-27 15:00:56 +02:00
2025-04-15 01:49:48 +02:00
2024-10-29 14:20:03 +01:00
2024-06-13 19:58:11 +03:00
2025-02-02 12:55:16 +01:00
2025-01-20 09:57:37 +02:00
2025-03-26 17:09:57 +02:00
2023-09-25 13:06:57 +10:00
2024-11-29 12:37:46 +02:00
2024-01-17 13:35:05 +02:00
2023-08-01 15:08:52 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-11-23 08:14:22 -07:00
2024-11-23 08:14:23 -07:00
2025-04-26 10:41:52 +02:00
2025-04-21 10:43:17 +02:00
2022-10-25 14:25:42 +03:00
2025-01-07 16:46:43 +01:00
2025-03-26 17:09:57 +02:00
2024-11-29 12:37:46 +02:00
2024-01-10 18:01:46 +11:00
2024-11-05 21:32:48 +01:00
2024-06-24 13:09:47 +03:00
2023-02-10 12:02:11 +02:00
2024-02-13 20:42:59 +02:00
2023-01-03 18:13:11 +02:00
2023-02-10 12:02:11 +02:00
2024-01-02 17:37:58 +02:00
2025-01-20 09:57:37 +02:00
2025-04-02 04:43:24 +02:00
2025-01-29 11:17:38 +01:00
2024-10-29 14:20:03 +01:00
2025-02-02 12:55:16 +01:00
2024-11-29 12:37:46 +02:00