mirror of
https://github.com/MariaDB/server.git
synced 2025-08-23 03:54:27 +03:00
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT queries to pass even when the node is not prepared to accept queries (wsrep_ready=OFF). Added a test case.
36 lines
994 B
Plaintext
36 lines
994 B
Plaintext
#
|
|
# wsrep_dirty_reads
|
|
#
|
|
# save the initial value
|
|
SET @wsrep_dirty_reads_session_saved = @@session.wsrep_dirty_reads;
|
|
# default
|
|
SELECT @@global.wsrep_dirty_reads;
|
|
ERROR HY000: Variable 'wsrep_dirty_reads' is a SESSION variable
|
|
SELECT @@session.wsrep_dirty_reads;
|
|
@@session.wsrep_dirty_reads
|
|
0
|
|
|
|
# scope and valid values
|
|
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
|
|
|
|
# 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'
|
|
|
|
# restore the initial values
|
|
SET @@session.wsrep_dirty_reads = @wsrep_dirty_reads_session_saved;
|
|
# End of test
|