1
############# mysql-test\t\timestamp_func.test #############################
3
# Variable Name: timestamp #
5
# Access Type: Dynamic #
9
# Creation Date: 2008-02-25 #
10
# Author: Sharique Abdullah #
12
# Modified: HHunger 2008-08-28 Reimplemented the test completely. #
14
# Description: Test Cases of Dynamic System Variable "timestamp" #
15
# that checks behavior of this variable in the following ways #
16
# * Functionality based on different values #
18
# Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html #
20
############################################################################
22
# Change timestamp which must have an effect on now(), but not on sysdate().
23
# Use Unix epoch timestamp
24
# All comparisons must deliver true(1)
25
# Exception: --sysdate-is-now switches off this behaviour and must not be set.
27
--echo ** Connecting con1 using root **
28
connect (con1,localhost,root,,);
29
SELECT date(now()) = date(sysdate());
30
SET @@session.timestamp = 1100000000;
31
SELECT date(now()) != date(sysdate());
33
# Assure that setting of the variable has no effect on other session.
34
--echo ** Connecting con0 using root **
35
connect (con0,localhost,root,,);
36
SELECT @@session.timestamp != 1100000000;
37
SET @@session.timestamp = 1000000000;
38
SELECT date(now()) != date(sysdate());
40
--echo ** Connection con1 **
42
SELECT @@session.timestamp != 1000000000;
43
SELECT @@session.timestamp = 1100000000;
45
--echo ** Connection default **
47
--echo Disconnecting Connections con0, con1