1
############################################################################
3
# Variable Name: timestamp with sysdate-is-now #
5
# Access Type: Dynamic #
9
# Creation Date: 2008-11-25 #
10
# Author: Horst Hunger #
12
# Description: Test Cases of Dynamic System Variable "timestamp" #
13
# that checks behavior of this variable in the following ways #
14
# * Like timstamp_func, but with set "sysdate-is-now". #
16
# Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html #
18
############################################################################
20
# Use Unix epoch timestamp
21
# Due to "--sysdate-is-now" timestamp must have an effect on both.
22
# See also timestamp_func.test.
24
--echo ** Connecting con1 using root **
25
connect (con1,localhost,root,,);
26
SELECT date(now()) = date(sysdate());
27
SET @@session.timestamp = 1100000000;
28
SELECT date(now()) != date(sysdate());
30
# Assure that setting of the variable has no effect on other session.
31
--echo ** Connecting con0 using root **
32
connect (con0,localhost,root,,);
33
SELECT @@session.timestamp != 1100000000;
34
SET @@session.timestamp = 1000000000;
35
SELECT date(now()) != date(sysdate());
37
--echo ** Connection con1 **
39
SELECT @@session.timestamp != 1000000000;
40
SELECT @@session.timestamp = 1100000000;
42
--echo ** Connection default **
44
--echo Disconnecting Connections con0, con1