1SET @session_start_value = @@session.timestamp;
2'#--------------------FN_DYNVARS_001_01------------------------#'
3SET @@timestamp = DEFAULT;
4SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
5floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
61	1
7'#---------------------FN_DYNVARS_001_02-------------------------#'
8SET @@global.timestamp = "1000";
9ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
10'#--------------------FN_DYNVARS_001_03------------------------#'
11SET @@timestamp = 0;
12SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
13floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
141	1
15'Setting 0 resets timestamp to session default timestamp'
16SET @@timestamp = -1000000000;
17Warnings:
18Warning	1292	Truncated incorrect timestamp value: '-1000000000'
19SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
20floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
211	1
22SET @temp_ts = @@timestamp - @@timestamp;
23SELECT @temp_ts;
24@temp_ts
250
26SET @@timestamp = 1.1;
27SELECT @@timestamp;
28@@timestamp
291.100000
30SET @@timestamp = 9999999999999999999999;
31Warnings:
32Warning	1292	Truncated incorrect timestamp value: '1e22'
33SELECT @@timestamp;
34@@timestamp
352147483647.000000
36'#--------------------FN_DYNVARS_001_04-------------------------#'
37SET @@timestamp = "100";
38ERROR 42000: Incorrect argument type to variable 'timestamp'
39SET @@timestamp = " ";
40ERROR 42000: Incorrect argument type to variable 'timestamp'
41'#----------------------FN_DYNVARS_001_06------------------------#'
42'#---------------------FN_DYNVARS_001_08-------------------------#'
43SET @@timestamp = OFF;
44ERROR 42000: Incorrect argument type to variable 'timestamp'
45SET @@timestamp = ON;
46ERROR 42000: Incorrect argument type to variable 'timestamp'
47SET @@timestamp = TRUE;
48SELECT @@timestamp;
49@@timestamp
501.000000
51SET @@timestamp = FALSE;
52'#---------------------FN_DYNVARS_001_10----------------------#'
53SET @@timestamp = 123456;
54SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
55@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
561
57SET @@timestamp = 654321;
58SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
59@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
601
61'#---------------------FN_DYNVARS_001_11----------------------#'
62SET timestamp = 1;
63SELECT @@timestamp;
64@@timestamp
651.000000
66SELECT local.timestamp;
67ERROR 42S02: Unknown table 'local' in field list
68SELECT session.timestamp;
69ERROR 42S02: Unknown table 'session' in field list
70SELECT timestamp = @@session.timestamp;
71ERROR 42S22: Unknown column 'timestamp' in 'field list'
72SET @@timestamp = @session_start_value;
73