summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r/read_only_basic.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/sys_vars/r/read_only_basic.result')
-rw-r--r--mysql-test/suite/sys_vars/r/read_only_basic.result119
1 files changed, 119 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/r/read_only_basic.result b/mysql-test/suite/sys_vars/r/read_only_basic.result
new file mode 100644
index 00000000000..ac153fa337c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/read_only_basic.result
@@ -0,0 +1,119 @@
+SET @start_value = @@global.read_only;
+SELECT @start_value;
+@start_value
+0
+'#--------------------FN_DYNVARS_139_01------------------------#'
+SET @@global.read_only = 1;
+SET @@global.read_only = DEFAULT;
+SELECT @@global.read_only;
+@@global.read_only
+0
+'#---------------------FN_DYNVARS_139_02-------------------------#'
+SET @@global.read_only = @start_value;
+SELECT @@global.read_only = 0;
+@@global.read_only = 0
+1
+'#--------------------FN_DYNVARS_139_03------------------------#'
+SET @@global.read_only = 0;
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = 1;
+SELECT @@global.read_only;
+@@global.read_only
+1
+SET @@global.read_only = TRUE;
+SELECT @@global.read_only;
+@@global.read_only
+1
+SET @@global.read_only = FALSE;
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = ON;
+SELECT @@global.read_only;
+@@global.read_only
+1
+SET @@global.read_only = OFF;
+SELECT @@global.read_only;
+@@global.read_only
+0
+'#--------------------FN_DYNVARS_139_04-------------------------#'
+SET @@global.read_only = -1;
+ERROR 42000: Variable 'read_only' can't be set to the value of '-1'
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = 4294967296;
+ERROR 42000: Variable 'read_only' can't be set to the value of '4294967296'
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = 10240022115;
+ERROR 42000: Variable 'read_only' can't be set to the value of '10240022115'
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = 10000.01;
+ERROR 42000: Variable 'read_only' can't be set to the value of '10000'
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = -1024;
+ERROR 42000: Variable 'read_only' can't be set to the value of '-1024'
+SELECT @@global.read_only;
+@@global.read_only
+0
+SET @@global.read_only = 42949672950;
+ERROR 42000: Variable 'read_only' can't be set to the value of '42949672950'
+SELECT @@global.read_only;
+@@global.read_only
+0
+'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+SET @@global.read_only = 'test';
+ERROR 42000: Variable 'read_only' can't be set to the value of 'test'
+SELECT @@global.read_only;
+@@global.read_only
+0
+'#-------------------FN_DYNVARS_139_05----------------------------#'
+SET @@session.read_only = 0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@read_only;
+@@read_only
+0
+'#----------------------FN_DYNVARS_139_06------------------------#'
+SELECT @@global.read_only = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='read_only';
+@@global.read_only = VARIABLE_VALUE
+1
+SELECT @@read_only = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='read_only';
+@@read_only = VARIABLE_VALUE
+1
+'#---------------------FN_DYNVARS_139_07----------------------#'
+SET @@global.read_only = 1;
+SELECT @@read_only = @@global.read_only;
+@@read_only = @@global.read_only
+1
+'#---------------------FN_DYNVARS_139_08----------------------#'
+SET read_only = 1;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@read_only;
+@@read_only
+1
+SET local.read_only = 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read_only = 1' at line 1
+SELECT local.read_only;
+ERROR 42S02: Unknown table 'local' in field list
+SET global.read_only = 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read_only = 1' at line 1
+SELECT global.read_only;
+ERROR 42S02: Unknown table 'global' in field list
+SELECT read_only = @@session.read_only;
+ERROR 42S22: Unknown column 'read_only' in 'field list'
+SET @@global.read_only = @start_value;
+SELECT @@global.read_only;
+@@global.read_only
+0