mariadb/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result
Jan Lindström 814787f4c2 MDEV-34117 : Assertion `! thd->in_sub_stmt' failed in bool trans_rollback_stmt(THD*)
Problem was that user could drop streaming replication table
when streaming replication was used.

Fixed by not allowing user to drop streaming replication
table when galera is enabled. When it is not enabled
super can drop it (as any table in mysql database).
Added checks for wsrep_trx_fragment_unit and wsrep_trx_fragment_size
variables so that streaming replication can't be enabled
when streaming replication table does not exists.

Fixed also bug when user is trying to disable streaming
replication by wsrep_trx_fragment_size=0 when it was
not enabled.
2025-11-03 10:45:56 +02:00

42 lines
1.6 KiB
Text

SELECT @@wsrep_on;
@@wsrep_on
0
SET @wsrep_debug_saved = @@global.wsrep_debug;
SET SESSION wsrep_trx_fragment_size=DEFAULT;
SELECT @@session.wsrep_trx_fragment_size;
@@session.wsrep_trx_fragment_size
0
SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
SHOW WARNINGS;
Level Code Message
Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded
Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
00000000-0000-0000-0000-000000000000:-1
SET GLOBAL wsrep_debug=1;
Warnings:
Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
NONE
SET GLOBAL wsrep_slave_threads=5;
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_slave_threads;
@@global.wsrep_slave_threads
1
SET GLOBAL wsrep_desync=1;
ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
SET SESSION wsrep_trx_fragment_unit='rows';
ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'rows'
SHOW WARNINGS;
Level Code Message
Warning 1231 Cannot set 'wsrep_trx_fragment_unit' because wsrep is switched off
Error 1231 Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'rows'
SELECT @@session.wsrep_trx_fragment_unit;
@@session.wsrep_trx_fragment_unit
bytes