HEX
Server: nginx/1.26.1
System: Linux iZrj9cbdvwu1cot8sjlyzlZ 5.10.134-15.al8.x86_64 #1 SMP Thu Jul 20 00:44:04 CST 2023 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: 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
Upload Files
File: //www/server/mysql/mysql-test/r/function_defaults_notembedded.result
#
# Test of function defaults for non-embedded server.
#
#
# Function defaults run 1. No microsecond precision.
#
SET TIME_ZONE = "+00:00";
#
# Test of INSERT DELAYED ... SET ...
#
# 2011-04-19 08:02:40 UTC
SET TIMESTAMP = 1303200160.123456;
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
INSERT DELAYED INTO t1 SET a = 1;
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:02:40
SELECT * FROM t1 WHERE b = 0;
a	b
INSERT DELAYED INTO t1 SET a = 2, b = '1980-01-02 10:20:30.405060';
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:02:40
2	1980-01-02 10:20:30
DROP TABLE t1;
#
# Test of INSERT DELAYED ... VALUES ...
#
# 2011-04-19 08:04:01 UTC
SET TIMESTAMP = 1303200241.234567;
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
INSERT DELAYED INTO t1 ( a ) VALUES (1);
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:04:01
INSERT DELAYED INTO t1 VALUES (2, '1977-12-19 12:34:56.789123');
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:04:01
2	1977-12-19 12:34:57
DROP TABLE t1;
#
# Test of a delayed insert handler servicing two insert operations
# with different sets of active defaults.
#
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
# 2011-04-19 08:04:01 UTC
SET TIMESTAMP = 1303200241.345678;
SET debug_sync = 'before_write_delayed SIGNAL parked WAIT_FOR go';
INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3);
SET debug_sync = 'now WAIT_FOR parked';
# 2011-04-19 08:04:01 UTC
SET TIME_ZONE="+03:00";
SET TIMESTAMP = 1303200241.456789;
INSERT DELAYED INTO t1 ( a, b ) VALUES (4, '1977-12-19 12:34:56.789123'), (5, '1977-12-19 12:34:57.891234'), (6, '1977-12-19 12:34:58.912345');
SET debug_sync = 'now SIGNAL go';
SELECT * FROM t1;
a	b
1	2011-04-19 08:04:01
2	2011-04-19 08:04:01
3	2011-04-19 08:04:01
4	1977-12-19 09:34:57
5	1977-12-19 09:34:58
6	1977-12-19 09:34:59
DROP TABLE t1;
#
# Test of early activation of function defaults.
#
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
SET TIMESTAMP = 1317235172.987654;
INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3);
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
SET TIMESTAMP = 385503754.876543;
INSERT DELAYED INTO t1 ( a ) VALUES (4), (5), (6);
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-09-28 18:39:32
2	2011-09-28 18:39:32
3	2011-09-28 18:39:32
4	1982-03-20 20:22:34
5	1982-03-20 20:22:34
6	1982-03-20 20:22:34
DROP TABLE t1;
#
# Function defaults run 2. Six digits scale on seconds precision.
#
SET TIME_ZONE = "+00:00";
#
# Test of INSERT DELAYED ... SET ...
#
# 2011-04-19 08:02:40 UTC
SET TIMESTAMP = 1303200160.123456;
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6));
INSERT DELAYED INTO t1 SET a = 1;
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:02:40.123456
SELECT * FROM t1 WHERE b = 0;
a	b
INSERT DELAYED INTO t1 SET a = 2, b = '1980-01-02 10:20:30.405060';
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:02:40.123456
2	1980-01-02 10:20:30.405060
DROP TABLE t1;
#
# Test of INSERT DELAYED ... VALUES ...
#
# 2011-04-19 08:04:01 UTC
SET TIMESTAMP = 1303200241.234567;
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6));
INSERT DELAYED INTO t1 ( a ) VALUES (1);
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:04:01.234567
INSERT DELAYED INTO t1 VALUES (2, '1977-12-19 12:34:56.789123');
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-04-19 08:04:01.234567
2	1977-12-19 12:34:56.789123
DROP TABLE t1;
#
# Test of a delayed insert handler servicing two insert operations
# with different sets of active defaults.
#
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6));
# 2011-04-19 08:04:01 UTC
SET TIMESTAMP = 1303200241.345678;
SET debug_sync = 'before_write_delayed SIGNAL parked WAIT_FOR go';
INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3);
SET debug_sync = 'now WAIT_FOR parked';
# 2011-04-19 08:04:01 UTC
SET TIME_ZONE="+03:00";
SET TIMESTAMP = 1303200241.456789;
INSERT DELAYED INTO t1 ( a, b ) VALUES (4, '1977-12-19 12:34:56.789123'), (5, '1977-12-19 12:34:57.891234'), (6, '1977-12-19 12:34:58.912345');
SET debug_sync = 'now SIGNAL go';
SELECT * FROM t1;
a	b
1	2011-04-19 08:04:01.345678
2	2011-04-19 08:04:01.345678
3	2011-04-19 08:04:01.345678
4	1977-12-19 09:34:56.789123
5	1977-12-19 09:34:57.891234
6	1977-12-19 09:34:58.912345
DROP TABLE t1;
#
# Test of early activation of function defaults.
#
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6));
SET TIMESTAMP = 1317235172.987654;
INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3);
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
SET TIMESTAMP = 385503754.876543;
INSERT DELAYED INTO t1 ( a ) VALUES (4), (5), (6);
Warnings:
Warning	1287	'INSERT DELAYED' is deprecated and will be removed in a future release. Please use INSERT instead
FLUSH TABLE t1;
SELECT * FROM t1;
a	b
1	2011-09-28 18:39:32.987654
2	2011-09-28 18:39:32.987654
3	2011-09-28 18:39:32.987654
4	1982-03-20 20:22:34.876543
5	1982-03-20 20:22:34.876543
6	1982-03-20 20:22:34.876543
DROP TABLE t1;