mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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>