Commit c32fd509 authored by Alexander Barkov's avatar Alexander Barkov

A cleanup for MDEV-16542 Fix ALTER TABLE FORCE to upgrade temporal types

Removing redundant space character after the data type comment
in SHOW CREATE TABLE, so the output changes from e.g.:

  a TIME /* mariadb-5.3 */  DEFAULT NULL

to

  a TIME /* mariadb-5.3 */ DEFAULT NULL

This is a prerequisite for MDEV-19906.
parent 497ee338
......@@ -61,44 +61,44 @@ CALL mdev16542;
# Original table
Table Create Table
t1 CREATE TABLE `t1` (
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=false
......@@ -106,32 +106,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` time /* mariadb-5.3 */ DEFAULT NULL,
`a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` time(6) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a0)` time /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a1)` time(1) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a2)` time(2) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a3)` time(3) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a4)` time(4) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a5)` time(5) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a6)` time(6) /* mariadb-5.3 */ DEFAULT NULL
`a0` time /* mariadb-5.3 */ DEFAULT NULL,
`a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` time(6) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a0)` time /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a1)` time(1) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a2)` time(2) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a3)` time(3) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a4)` time(4) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a5)` time(5) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a6)` time(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` time /* mariadb-5.3 */ DEFAULT NULL,
`a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` time(6) /* mariadb-5.3 */ DEFAULT NULL
`a0` time /* mariadb-5.3 */ DEFAULT NULL,
`a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` time(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=true
......@@ -139,32 +139,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL
`a0` time /* mysql-5.6 */ DEFAULT NULL,
`a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (
......@@ -181,44 +181,44 @@ CALL mdev16542;
# Original table
Table Create Table
t1 CREATE TABLE `t1` (
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=false
......@@ -226,32 +226,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
`a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a0)` datetime /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a1)` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a2)` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a3)` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a4)` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a5)` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a6)` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
`a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
`a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a0)` datetime /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a1)` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a2)` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a3)` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a4)` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a5)` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
`COALESCE(a6)` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
`a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
`a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
`a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
`a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
`a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
`a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
`a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
`a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=true
......@@ -259,32 +259,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
`a0` datetime /* mysql-5.6 */ DEFAULT NULL,
`a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
`a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
`a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
`a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
`a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
`a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (
......@@ -301,44 +301,44 @@ CALL mdev16542;
# Original table
Table Create Table
t1 CREATE TABLE `t1` (
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=false
......@@ -346,32 +346,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`COALESCE(a0)` timestamp /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a1)` timestamp(1) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a2)` timestamp(2) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a3)` timestamp(3) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a4)` timestamp(4) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a5)` timestamp(5) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a6)` timestamp(6) /* mariadb-5.3 */ NULL DEFAULT NULL
`a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`COALESCE(a0)` timestamp /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a1)` timestamp(1) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a2)` timestamp(2) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a3)` timestamp(3) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a4)` timestamp(4) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a5)` timestamp(5) /* mariadb-5.3 */ NULL DEFAULT NULL,
`COALESCE(a6)` timestamp(6) /* mariadb-5.3 */ NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
`a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=true
......@@ -379,32 +379,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
`COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
`a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET @@global.mysql56_temporal_format=DEFAULT;
......
......@@ -2119,7 +2119,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
DBUG_EXECUTE_IF("sql_type",
packet->append(" /* ");
packet->append(field->type_handler()->version().ptr());
packet->append(" */ ");
packet->append(" */");
);
if (field->has_charset() && !(sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment