############################################################################ # # # Variable Name: timestamp with sysdate-is-now # # Scope: GLOBAL # # Access Type: Dynamic # # Data Type: INTEGER # # # # # # Creation Date: 2008-11-25 # # Author: Horst Hunger # # # # Description: Test Cases of Dynamic System Variable "timestamp" # # that checks behavior of this variable in the following ways # # * Like timstamp_func, but with set "sysdate-is-now". # # # # Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html # # # ############################################################################ # Use Unix epoch timestamp # Due to "--sysdate-is-now" timestamp must have an effect on both. # See also timestamp_func.test. connect (con1,localhost,root,,); SELECT date(now()) = date(sysdate()); SET @@session.timestamp = 1100000000; SELECT date(now()) != date(sysdate()); # Assure that setting of the variable has no effect on other session. connect (con0,localhost,root,,); SELECT @@session.timestamp != 1100000000; SET @@session.timestamp = 1000000000; SELECT date(now()) != date(sysdate()); connection con1; SELECT @@session.timestamp != 1000000000; SELECT @@session.timestamp = 1100000000; connection default; disconnect con0; disconnect con1;