1
SET @session_start_value = @@session.timestamp;
2
'#--------------------FN_DYNVARS_001_01------------------------#'
3
SET @@timestamp = DEFAULT;
4
SELECT FLOOR(@@timestamp) = UNIX_TIMESTAMP();
5
FLOOR(@@timestamp) = UNIX_TIMESTAMP()
7
'#---------------------FN_DYNVARS_001_02-------------------------#'
8
SET @@global.timestamp = "1000";
9
ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
10
'#--------------------FN_DYNVARS_001_03------------------------#'
12
SELECT FLOOR(@@timestamp) = UNIX_TIMESTAMP();
13
FLOOR(@@timestamp) = UNIX_TIMESTAMP()
15
'Setting 0 resets timestamp to session default timestamp'
16
SET @@timestamp = -1000000000;
18
Warning 1292 Truncated incorrect timestamp value: '-1000000000'
19
SELECT FLOOR(@@timestamp) = UNIX_TIMESTAMP();
20
FLOOR(@@timestamp) = UNIX_TIMESTAMP()
22
SET @temp_ts = @@timestamp - @@timestamp;
26
'#--------------------FN_DYNVARS_001_04-------------------------#'
27
SET @@timestamp = "100";
28
ERROR 42000: Incorrect argument type to variable 'timestamp'
29
SET @@timestamp = " ";
30
ERROR 42000: Incorrect argument type to variable 'timestamp'
31
SET @@timestamp = 9999999999999999999999;
32
ERROR 42000: Variable 'timestamp' can't be set to the value of '1e22'
33
'#----------------------FN_DYNVARS_001_06------------------------#'
34
'#---------------------FN_DYNVARS_001_08-------------------------#'
35
SET @@timestamp = OFF;
36
ERROR 42000: Incorrect argument type to variable 'timestamp'
38
ERROR 42000: Incorrect argument type to variable 'timestamp'
39
SET @@timestamp = TRUE;
43
SET @@timestamp = FALSE;
44
'#---------------------FN_DYNVARS_001_10----------------------#'
45
SET @@timestamp = 123456;
46
SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
47
@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
49
SET @@timestamp = 654321;
50
SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
51
@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
53
'#---------------------FN_DYNVARS_001_11----------------------#'
58
SELECT local.timestamp;
59
ERROR 42S02: Unknown table 'local' in field list
60
SELECT session.timestamp;
61
ERROR 42S02: Unknown table 'session' in field list
62
SELECT timestamp = @@session.timestamp;
63
ERROR 42S22: Unknown column 'timestamp' in 'field list'
64
SET @@timestamp = @session_start_value;