2008-04-10 15:14:28 +02:00
|
|
|
|
SET @session_start_value = @@session.sql_notes;
|
|
|
|
|
SELECT @session_start_value;
|
|
|
|
|
@session_start_value
|
|
|
|
|
1
|
|
|
|
|
'#--------------------FN_DYNVARS_161_01------------------------#'
|
|
|
|
|
SET @@session.sql_notes = 0;
|
|
|
|
|
SET @@session.sql_notes = DEFAULT;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
2009-12-22 10:35:56 +01:00
|
|
|
|
1
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SET @@session.sql_notes = 1;
|
|
|
|
|
SET @@session.sql_notes = DEFAULT;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
1
|
|
|
|
|
'#---------------------FN_DYNVARS_161_02-------------------------#'
|
|
|
|
|
SET sql_notes = 1;
|
|
|
|
|
SELECT @@sql_notes;
|
|
|
|
|
@@sql_notes
|
|
|
|
|
1
|
|
|
|
|
SELECT session.sql_notes;
|
|
|
|
|
ERROR 42S02: Unknown table 'session' in field list
|
|
|
|
|
SELECT local.sql_notes;
|
|
|
|
|
ERROR 42S02: Unknown table 'local' in field list
|
|
|
|
|
SET session sql_notes = 0;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
0
|
|
|
|
|
'#--------------------FN_DYNVARS_161_03------------------------#'
|
|
|
|
|
SET @@session.sql_notes = 0;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
0
|
|
|
|
|
SET @@session.sql_notes = 1;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
1
|
|
|
|
|
'#--------------------FN_DYNVARS_161_04-------------------------#'
|
|
|
|
|
SET @@session.sql_notes = -1;
|
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of '-1'
|
|
|
|
|
SET @@session.sql_notes = 2;
|
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of '2'
|
|
|
|
|
SET @@session.sql_notes = "T";
|
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'T'
|
|
|
|
|
SET @@session.sql_notes = "Y";
|
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'Y'
|
|
|
|
|
SET @@session.sql_notes = TR<54>E;
|
2009-12-22 10:35:56 +01:00
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'TR<54>E'
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SET @@session.sql_notes = <20>N;
|
2009-12-22 10:35:56 +01:00
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of '<27>N'
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SET @@session.sql_notes = OF;
|
2009-12-22 10:35:56 +01:00
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'OF'
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SET @@session.sql_notes = <20>FF;
|
2009-12-22 10:35:56 +01:00
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of '<27>FF'
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SET @@session.sql_notes = '<27>';
|
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of '<27>'
|
|
|
|
|
SET @@session.sql_notes = NO;
|
|
|
|
|
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'NO'
|
|
|
|
|
'#-------------------FN_DYNVARS_161_05----------------------------#'
|
2009-12-22 10:35:56 +01:00
|
|
|
|
SET @@global.sql_notes = 1-@@global.sql_notes;
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SELECT @@global.sql_notes;
|
2009-12-22 10:35:56 +01:00
|
|
|
|
@@global.sql_notes
|
|
|
|
|
0
|
|
|
|
|
SET @@global.sql_notes = 1-@@global.sql_notes;
|
|
|
|
|
SELECT @@global.sql_notes;
|
|
|
|
|
@@global.sql_notes
|
|
|
|
|
1
|
2008-04-10 15:14:28 +02:00
|
|
|
|
'#----------------------FN_DYNVARS_161_06------------------------#'
|
|
|
|
|
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_notes';
|
|
|
|
|
count(VARIABLE_VALUE)
|
|
|
|
|
1
|
|
|
|
|
'#----------------------FN_DYNVARS_161_07------------------------#'
|
2009-10-09 15:34:07 +02:00
|
|
|
|
SELECT IF(@@session.sql_notes, "ON", "OFF") = VARIABLE_VALUE
|
2008-04-10 15:14:28 +02:00
|
|
|
|
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
|
|
|
|
WHERE VARIABLE_NAME='sql_notes';
|
2009-10-09 15:34:07 +02:00
|
|
|
|
IF(@@session.sql_notes, "ON", "OFF") = VARIABLE_VALUE
|
2008-04-10 15:14:28 +02:00
|
|
|
|
1
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
2009-12-22 10:35:56 +01:00
|
|
|
|
1
|
2008-04-10 15:14:28 +02:00
|
|
|
|
SELECT VARIABLE_VALUE
|
|
|
|
|
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
|
|
|
|
WHERE VARIABLE_NAME='sql_notes';
|
|
|
|
|
VARIABLE_VALUE
|
2009-12-22 10:35:56 +01:00
|
|
|
|
ON
|
2008-04-10 15:14:28 +02:00
|
|
|
|
'#---------------------FN_DYNVARS_161_08-------------------------#'
|
|
|
|
|
SET @@session.sql_notes = OFF;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
0
|
|
|
|
|
SET @@session.sql_notes = ON;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
1
|
|
|
|
|
'#---------------------FN_DYNVARS_161_09----------------------#'
|
|
|
|
|
SET @@session.sql_notes = TRUE;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
1
|
|
|
|
|
SET @@session.sql_notes = FALSE;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
0
|
|
|
|
|
SET @@session.sql_notes = @session_start_value;
|
|
|
|
|
SELECT @@session.sql_notes;
|
|
|
|
|
@@session.sql_notes
|
|
|
|
|
1
|