mirror of
https://github.com/MariaDB/server.git
synced 2025-05-28 13:01:41 +03:00
Tasks:- Changes in wsrep_dirty_reads variable 1.) Global + Session scope (Current: session-only) 2.) Can be set using command line. 3.) Allow all commands that do not change data (besides SELECT) 4.) Allow prepared Statements that do not change data 5.) Works with wsrep_sync_wait enabled
55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
#
|
|
# wsrep_dirty_reads
|
|
#
|
|
# save the initial value
|
|
SET @wsrep_dirty_reads_session_saved = @@session.wsrep_dirty_reads;
|
|
# default
|
|
SELECT @@global.wsrep_dirty_reads;
|
|
@@global.wsrep_dirty_reads
|
|
0
|
|
SELECT @@session.wsrep_dirty_reads;
|
|
@@session.wsrep_dirty_reads
|
|
0
|
|
|
|
# valid values for session
|
|
SET @@session.wsrep_dirty_reads=OFF;
|
|
SELECT @@session.wsrep_dirty_reads;
|
|
@@session.wsrep_dirty_reads
|
|
0
|
|
SET @@session.wsrep_dirty_reads=ON;
|
|
SELECT @@session.wsrep_dirty_reads;
|
|
@@session.wsrep_dirty_reads
|
|
1
|
|
SET @@session.wsrep_dirty_reads=default;
|
|
SELECT @@session.wsrep_dirty_reads;
|
|
@@session.wsrep_dirty_reads
|
|
0
|
|
|
|
# valid values for global
|
|
SET @@global.wsrep_dirty_reads=OFF;
|
|
SELECT @@global.wsrep_dirty_reads;
|
|
@@global.wsrep_dirty_reads
|
|
0
|
|
SET @@global.wsrep_dirty_reads=ON;
|
|
SELECT @@global.wsrep_dirty_reads;
|
|
@@global.wsrep_dirty_reads
|
|
1
|
|
SET @@global.wsrep_dirty_reads=default;
|
|
SELECT @@global.wsrep_dirty_reads;
|
|
@@global.wsrep_dirty_reads
|
|
0
|
|
|
|
# invalid values
|
|
SET @@session.wsrep_dirty_reads=NULL;
|
|
ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'NULL'
|
|
SET @@session.wsrep_dirty_reads='junk';
|
|
ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'junk'
|
|
SET @@global.wsrep_dirty_reads=NULL;
|
|
ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'NULL'
|
|
SET @@global.wsrep_dirty_reads='junk';
|
|
ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'junk'
|
|
|
|
# restore the initial values
|
|
SET @@session.wsrep_dirty_reads = @wsrep_dirty_reads_session_saved;
|
|
# End of test
|