summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r/timestamp_basic_32.result
blob: cc4f0324c0ffe1148805ea02ccfadb00aedb0b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
SET @session_start_value = @@session.timestamp;
'#--------------------FN_DYNVARS_001_01------------------------#'
SET @@timestamp = DEFAULT;
'timestamp does not have any DEFAULT value'
'#---------------------FN_DYNVARS_001_02-------------------------#'
SET @@global.timestamp = "1000";
ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
'#--------------------FN_DYNVARS_001_03------------------------#'
SET @@timestamp = 0;
'Setting 0 resets timestamp to session default timestamp'
SET @@timestamp = 123456789123456;
SELECT @@timestamp;
@@timestamp
2249167232
SET @@timestamp = 60*60*60*60*365;
SELECT @@timestamp;
@@timestamp
435432704
SET @@timestamp = -1000000000;
SELECT @@timestamp;
@@timestamp
3294967296
SET @temp_ts = @@timestamp - @@timestamp;
SELECT @temp_ts;
@temp_ts
0
'#--------------------FN_DYNVARS_001_04-------------------------#'
SET @@timestamp = "100";
ERROR 42000: Incorrect argument type to variable 'timestamp'
'Bug# 34836: Documentation says its a string variable but infact its numeric'
SET @@timestamp = " ";
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = 1.1;
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = 9999999999999999999999;
ERROR 42000: Incorrect argument type to variable 'timestamp'
'#----------------------FN_DYNVARS_001_06------------------------#'
SELECT @@timestamp = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
WHERE VARIABLE_NAME='timestamp';
@@timestamp = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_001_08-------------------------#'
SET @@timestamp = OFF;
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = ON;
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = TRUE;
SELECT @@timestamp;
@@timestamp
1
SET @@timestamp = FALSE;
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@timestamp = 123456;
SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
1
SET @@timestamp = 654321;
SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET timestamp = 1;
SELECT @@timestamp;
@@timestamp
1
SELECT local.timestamp;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.timestamp;
ERROR 42S02: Unknown table 'session' in field list
SELECT timestamp = @@session.timestamp;
ERROR 42S22: Unknown column 'timestamp' in 'field list'
SET @@timestamp = @session_start_value;