mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -483,7 +483,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=MyISAM 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 );
|
||||
@ -491,7 +491,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -501,7 +501,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -527,7 +527,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -536,7 +536,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -546,7 +546,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -554,7 +554,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -563,7 +563,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -573,7 +573,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -586,7 +586,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
@ -650,7 +650,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -659,7 +659,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -668,7 +668,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -695,7 +695,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t7;
|
||||
f
|
||||
@ -704,7 +704,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t8;
|
||||
g
|
||||
@ -713,7 +713,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t9;
|
||||
h
|
||||
@ -753,25 +753,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -792,7 +792,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -801,7 +801,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -810,7 +810,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -847,7 +847,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SET TIMESTAMP = 2000.876543;
|
||||
@ -1224,12 +1224,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
|
||||
@ -1276,12 +1276,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
|
||||
@ -1343,12 +1343,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
|
||||
@ -1381,12 +1381,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
|
||||
@ -1429,7 +1429,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=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 ( a ) VALUES ( 1 );
|
||||
SELECT * FROM t1;
|
||||
@ -2029,7 +2029,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=MyISAM 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 );
|
||||
@ -2037,7 +2037,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -2047,7 +2047,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2073,7 +2073,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -2082,7 +2082,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2092,7 +2092,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2100,7 +2100,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -2109,7 +2109,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2119,7 +2119,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
@ -2132,7 +2132,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=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
@ -2196,7 +2196,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -2205,7 +2205,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -2214,7 +2214,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -2241,7 +2241,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t7;
|
||||
f
|
||||
@ -2250,7 +2250,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t8;
|
||||
g
|
||||
@ -2259,7 +2259,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t9;
|
||||
h
|
||||
@ -2299,25 +2299,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=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -2338,7 +2338,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
@ -2347,7 +2347,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t3;
|
||||
b
|
||||
@ -2356,7 +2356,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t4;
|
||||
c
|
||||
@ -2393,7 +2393,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=MyISAM DEFAULT CHARSET=latin1
|
||||
SET TIMESTAMP = 2000.876543;
|
||||
@ -2770,12 +2770,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
|
||||
@ -2822,12 +2822,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
|
||||
@ -2889,12 +2889,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
|
||||
@ -2927,12 +2927,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
|
||||
@ -2975,7 +2975,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=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 ( a ) VALUES ( 1 );
|
||||
SELECT * FROM t1;
|
||||
|
Reference in New Issue
Block a user