diff options
Diffstat (limited to 'mysql-test/suite/sys_vars/t/timestamp_basic.test')
-rw-r--r-- | mysql-test/suite/sys_vars/t/timestamp_basic.test | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/mysql-test/suite/sys_vars/t/timestamp_basic.test b/mysql-test/suite/sys_vars/t/timestamp_basic.test index a5baf304bf3..8b26622443d 100644 --- a/mysql-test/suite/sys_vars/t/timestamp_basic.test +++ b/mysql-test/suite/sys_vars/t/timestamp_basic.test @@ -43,7 +43,7 @@ SET @session_start_value = @@session.timestamp; SET @@timestamp = DEFAULT; -SELECT @@timestamp = UNIX_TIMESTAMP(); +SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6)); --echo '#---------------------FN_DYNVARS_001_02-------------------------#' ############################################################## @@ -59,16 +59,22 @@ SET @@global.timestamp = "1000"; ######################################################################## SET @@timestamp = 0; -SELECT @@timestamp = UNIX_TIMESTAMP(); +SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6)); --echo 'Setting 0 resets timestamp to session default timestamp' SET @@timestamp = -1000000000; -SELECT @@timestamp = UNIX_TIMESTAMP(); +SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6)); SET @temp_ts = @@timestamp - @@timestamp; SELECT @temp_ts; +SET @@timestamp = 1.1; +SELECT @@timestamp; + +SET @@timestamp = 9999999999999999999999; +SELECT @@timestamp; + --echo '#--------------------FN_DYNVARS_001_04-------------------------#' ########################################################################### # Change the value of timestamp to invalid value # @@ -81,14 +87,6 @@ SET @@timestamp = "100"; --Error ER_WRONG_TYPE_FOR_VAR SET @@timestamp = " "; ---Error ER_WRONG_TYPE_FOR_VAR -SET @@timestamp = 1.1; - ---Error ER_WRONG_TYPE_FOR_VAR -SET @@timestamp = 9999999999999999999999; - - - --echo '#----------------------FN_DYNVARS_001_06------------------------#' ######################################################################### # Check if the value in SESSION Table matches value in variable # |