Server IP : 172.67.216.182 / Your IP : 162.158.106.34 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/sys_vars/r/ |
Upload File : |
SET @session_start_value = @@session.timestamp; '#--------------------FN_DYNVARS_001_01------------------------#' SET @@timestamp = DEFAULT; SELECT FLOOR(@@timestamp) = UNIX_TIMESTAMP(); FLOOR(@@timestamp) = UNIX_TIMESTAMP() 1 '#---------------------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; SELECT FLOOR(@@timestamp) = UNIX_TIMESTAMP(); FLOOR(@@timestamp) = UNIX_TIMESTAMP() 1 'Setting 0 resets timestamp to session default timestamp' SET @@timestamp = -1000000000; Warnings: Warning 1292 Truncated incorrect timestamp value: '-1000000000' SELECT FLOOR(@@timestamp) = UNIX_TIMESTAMP(); FLOOR(@@timestamp) = UNIX_TIMESTAMP() 1 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' SET @@timestamp = " "; ERROR 42000: Incorrect argument type to variable 'timestamp' SET @@timestamp = 9999999999999999999999; ERROR 42000: Variable 'timestamp' can't be set to the value of '1e22' '#----------------------FN_DYNVARS_001_06------------------------#' '#---------------------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.000000 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.000000 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;