[MDEV-29665] Variable 'server_id' can't be set to the value of '1' Created: 2022-09-29  Updated: 2022-09-30  Resolved: 2022-09-30

Status: Closed
Project: MariaDB Server
Component/s: wsrep
Affects Version/s: 10.6.10
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Johan Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

mysql> show global variables like '%server_id%';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| server_id     | 658000 |
+---------------+--------+
1 row in set (0.00 sec)
 
mysql> set @@session.server_id=658000;
ERROR 1231 (42000): Variable 'server_id' can't be set to the value of '658000'
mysql> set @@session.server_id=0;
ERROR 1231 (42000): Variable 'server_id' can't be set to the value of '0'
mysql> set @@session.server_id=1;
ERROR 1231 (42000): Variable 'server_id' can't be set to the value of '1'
 
mysql> select @@version;
+---------------------------------------------+
| @@version                                   |
+---------------------------------------------+
| 10.6.10-MariaDB-1:10.6.10+maria~ubu2004-log |
+---------------------------------------------+
1 row in set (0.00 sec)

The problem is then that I cannot to PITR from mariadb-binlog , as the binlog contains:

/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.server_id=658000*//*!*/;

^^^ this command fails ^^



 Comments   
Comment by Johan [ 2022-09-29 ]

The issue seems that this a Galera node.

First one must turn off wsrep
MariaDB [(none)]> SET GLOBAL wsrep_on=OFF;
Query OK, 0 rows affected (0.000 sec)

Then, it is possible to set the session id. Very inconvenient.

Comment by Sergei Golubchik [ 2022-09-30 ]

You need to pay attention to warnings, not only to errors, then you'd see "Can't change server_id because wsrep and wsrep_gtid_mode is set. You can set server_id only with wsrep_new_cluster. "

Generated at Thu Feb 08 10:10:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.