Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
SQL_MODE MAXDB is documented as an equivalent of PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, MAXDB, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER. It's a recursive definition in itself, the only meaningful way to read it is that it's an equivalent of the combination of the other listed modes; but it is not. At least one extra effect is that MAXDB mode makes timestamp be converted into datetime, while the combination of the listed modes doesn't:
set sql_mode= 'MAXDB'; |
create table t1 (t timestamp); |
show create table t1; |
Table Create Table |
t1 CREATE TABLE "t1" ( |
"t" datetime DEFAULT NULL |
)
|
drop table t1; |
set sql_mode= 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER'; |
create table t1 (t timestamp); |
show create table t1; |
Table Create Table |
t1 CREATE TABLE "t1" ( |
"t" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP |
)
|
It was the same in MySQL up to an including 5.6; in 5.7 MAXDB mode was deprecated, and a warning about implicit conversion was returned. in 8.0, the mode is removed.
At least the documentation needs to be updated, but maybe MariaDB doesn't need the mode either?