mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
store/show vcols as item->print()
otherwise we'd need to store sql_mode *per vcol* (consider CREATE INDEX...) and how SHOW CREATE TABLE would support that? Additionally, get rid of vcol::expr_str, just to make sure the string is always generated and never leaked in the original form.
This commit is contained in:
@ -484,7 +484,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c TIMESTAMP NULL );
|
||||
@ -492,7 +492,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`c` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -502,7 +502,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -528,7 +528,7 @@ CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE N
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -537,7 +537,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`c` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -547,7 +547,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` timestamp NULL DEFAULT NULL,
|
||||
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -555,7 +555,7 @@ CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -564,7 +564,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`c` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -574,7 +574,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` timestamp NULL DEFAULT NULL,
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -587,7 +587,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
@ -651,7 +651,7 @@ CREATE TABLE t2 SELECT a FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -660,7 +660,7 @@ CREATE TABLE t3 SELECT b FROM t1;
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -669,7 +669,7 @@ CREATE TABLE t4 SELECT c FROM t1;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
|
||||
`c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -696,7 +696,7 @@ CREATE TABLE t7 SELECT f FROM t1;
|
||||
SHOW CREATE TABLE t7;
|
||||
Table Create Table
|
||||
t7 CREATE TABLE `t7` (
|
||||
`f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
`f` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t7;
|
||||
f
|
||||
@ -705,7 +705,7 @@ CREATE TABLE t8 SELECT g FROM t1;
|
||||
SHOW CREATE TABLE t8;
|
||||
Table Create Table
|
||||
t8 CREATE TABLE `t8` (
|
||||
`g` datetime DEFAULT CURRENT_TIMESTAMP
|
||||
`g` datetime DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t8;
|
||||
g
|
||||
@ -714,7 +714,7 @@ CREATE TABLE t9 SELECT h FROM t1;
|
||||
SHOW CREATE TABLE t9;
|
||||
Table Create Table
|
||||
t9 CREATE TABLE `t9` (
|
||||
`h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
|
||||
`h` datetime DEFAULT NULL ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t9;
|
||||
h
|
||||
@ -754,25 +754,25 @@ SELECT * FROM t1;
|
||||
SHOW CREATE TABLE t12;
|
||||
Table Create Table
|
||||
t12 CREATE TABLE `t12` (
|
||||
`k` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`l` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`k` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`l` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`m` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
|
||||
`o` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00',
|
||||
`p` timestamp NULL DEFAULT NULL,
|
||||
`q` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`r` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`s` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
`q` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`r` datetime DEFAULT current_timestamp(),
|
||||
`s` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`t` datetime DEFAULT NULL,
|
||||
`u` datetime DEFAULT '1986-09-27 03:00:00',
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
|
||||
`d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00',
|
||||
`e` timestamp NULL DEFAULT NULL,
|
||||
`f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`g` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
`f` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`g` datetime DEFAULT current_timestamp(),
|
||||
`h` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`i` datetime DEFAULT NULL,
|
||||
`j` datetime DEFAULT '1986-09-27 03:00:00'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -793,7 +793,7 @@ CREATE TABLE t2 SELECT a FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
`a` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -802,7 +802,7 @@ CREATE TABLE t3 SELECT b FROM t1;
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`b` datetime DEFAULT CURRENT_TIMESTAMP
|
||||
`b` datetime DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -811,7 +811,7 @@ CREATE TABLE t4 SELECT c FROM t1;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`c` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
|
||||
`c` datetime DEFAULT NULL ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -848,7 +848,7 @@ CREATE TABLE t2 ( b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRE
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SET TIMESTAMP = 2000.876543;
|
||||
@ -1225,12 +1225,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime DEFAULT NULL,
|
||||
`b` datetime DEFAULT '2011-11-18 00:00:00',
|
||||
`like_b` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`like_b` datetime DEFAULT current_timestamp(),
|
||||
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
|
||||
`like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`like_c` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
|
||||
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
|
||||
`f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`f` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`g` timestamp NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -1277,12 +1277,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime DEFAULT NULL,
|
||||
`b` datetime DEFAULT '2011-11-18 00:00:00',
|
||||
`like_b` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`like_b` datetime DEFAULT current_timestamp(),
|
||||
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
|
||||
`like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`like_c` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
|
||||
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
|
||||
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`f` timestamp NULL DEFAULT current_timestamp(),
|
||||
`g` timestamp NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -1344,12 +1344,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime DEFAULT NULL,
|
||||
`b` datetime DEFAULT '2011-11-18 00:00:00',
|
||||
`like_b` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`like_b` datetime DEFAULT current_timestamp(),
|
||||
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
|
||||
`like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`like_c` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
|
||||
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
|
||||
`f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`f` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`g` timestamp NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -1382,12 +1382,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime DEFAULT NULL,
|
||||
`b` datetime DEFAULT '2011-11-18 00:00:00',
|
||||
`like_b` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`like_b` datetime DEFAULT current_timestamp(),
|
||||
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
|
||||
`like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
|
||||
`like_c` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
|
||||
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
|
||||
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`f` timestamp NULL DEFAULT current_timestamp(),
|
||||
`g` timestamp NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -1430,7 +1430,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
`b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 ( a ) VALUES ( 1 );
|
||||
SELECT * FROM t1;
|
||||
@ -2030,7 +2030,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), c TIMESTAMP(6) NULL );
|
||||
@ -2038,7 +2038,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UP
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`c` timestamp(6) NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -2048,7 +2048,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UP
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2074,7 +2074,7 @@ CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDAT
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` timestamp(6) NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -2083,7 +2083,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`c` timestamp(6) NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2093,7 +2093,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` timestamp(6) NULL DEFAULT NULL,
|
||||
`a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2101,7 +2101,7 @@ CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMES
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` timestamp(6) NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -2110,7 +2110,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`c` timestamp(6) NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2120,7 +2120,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` timestamp(6) NULL DEFAULT NULL,
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2133,7 +2133,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
@ -2197,7 +2197,7 @@ CREATE TABLE t2 SELECT a FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -2206,7 +2206,7 @@ CREATE TABLE t3 SELECT b FROM t1;
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -2215,7 +2215,7 @@ CREATE TABLE t4 SELECT c FROM t1;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -2242,7 +2242,7 @@ CREATE TABLE t7 SELECT f FROM t1;
|
||||
SHOW CREATE TABLE t7;
|
||||
Table Create Table
|
||||
t7 CREATE TABLE `t7` (
|
||||
`f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`f` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t7;
|
||||
f
|
||||
@ -2251,7 +2251,7 @@ CREATE TABLE t8 SELECT g FROM t1;
|
||||
SHOW CREATE TABLE t8;
|
||||
Table Create Table
|
||||
t8 CREATE TABLE `t8` (
|
||||
`g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6)
|
||||
`g` datetime(6) DEFAULT current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t8;
|
||||
g
|
||||
@ -2260,7 +2260,7 @@ CREATE TABLE t9 SELECT h FROM t1;
|
||||
SHOW CREATE TABLE t9;
|
||||
Table Create Table
|
||||
t9 CREATE TABLE `t9` (
|
||||
`h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`h` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t9;
|
||||
h
|
||||
@ -2300,25 +2300,25 @@ SELECT * FROM t1;
|
||||
SHOW CREATE TABLE t12;
|
||||
Table Create Table
|
||||
t12 CREATE TABLE `t12` (
|
||||
`k` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`l` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`m` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`k` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`l` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`m` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`o` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765',
|
||||
`p` timestamp(6) NULL DEFAULT NULL,
|
||||
`q` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`r` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`s` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`q` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`r` datetime(6) DEFAULT current_timestamp(6),
|
||||
`s` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6),
|
||||
`t` datetime(6) DEFAULT NULL,
|
||||
`u` datetime(6) DEFAULT '1986-09-27 03:00:00.098765',
|
||||
`a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765',
|
||||
`e` timestamp(6) NULL DEFAULT NULL,
|
||||
`f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`f` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`g` datetime(6) DEFAULT current_timestamp(6),
|
||||
`h` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6),
|
||||
`i` datetime(6) DEFAULT NULL,
|
||||
`j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@ -2339,7 +2339,7 @@ CREATE TABLE t2 SELECT a FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`a` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -2348,7 +2348,7 @@ CREATE TABLE t3 SELECT b FROM t1;
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6)
|
||||
`b` datetime(6) DEFAULT current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -2357,7 +2357,7 @@ CREATE TABLE t4 SELECT c FROM t1;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`c` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`c` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -2394,7 +2394,7 @@ CREATE TABLE t2 ( b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SET TIMESTAMP = 2000.876543;
|
||||
@ -2771,12 +2771,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime(6) DEFAULT NULL,
|
||||
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`like_b` datetime(6) DEFAULT current_timestamp(6),
|
||||
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
|
||||
`f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`f` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`g` timestamp(6) NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -2823,12 +2823,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime(6) DEFAULT NULL,
|
||||
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`like_b` datetime(6) DEFAULT current_timestamp(6),
|
||||
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
|
||||
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`f` timestamp NULL DEFAULT current_timestamp(),
|
||||
`g` timestamp(6) NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -2890,12 +2890,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime(6) DEFAULT NULL,
|
||||
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`like_b` datetime(6) DEFAULT current_timestamp(6),
|
||||
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
|
||||
`f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`f` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`g` timestamp(6) NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -2928,12 +2928,12 @@ t1 CREATE TABLE `t1` (
|
||||
`dummy` int(11) DEFAULT NULL,
|
||||
`a` datetime(6) DEFAULT NULL,
|
||||
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`like_b` datetime(6) DEFAULT current_timestamp(6),
|
||||
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
|
||||
`like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
|
||||
`like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
|
||||
`d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
|
||||
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
|
||||
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`f` timestamp NULL DEFAULT current_timestamp(),
|
||||
`g` timestamp(6) NULL DEFAULT NULL,
|
||||
`h` int(11) DEFAULT NULL,
|
||||
`i` int(11) NOT NULL DEFAULT 42
|
||||
@ -2976,7 +2976,7 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
|
||||
`b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 ( a ) VALUES ( 1 );
|
||||
SELECT * FROM t1;
|
||||
|
Reference in New Issue
Block a user