Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
These scripts:
DROP TABLE IF EXISTS t1,t2;
|
CREATE TABLE t1 (a DATETIME);
|
CREATE TABLE t2 (a YEAR);
|
INSERT INTO t2 VALUES (2000);
|
INSERT INTO t1 SELECT * FROM t2;
|
SELECT * FROM t1;
|
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a YEAR);
|
INSERT INTO t1 VALUES (2000);
|
ALTER TABLE t1 MODIFY a DATETIME;
|
SHOW WARNINGS;
|
SELECT * FROM t1;
|
return
+---------------------+
|
| a |
|
+---------------------+
|
| 0000-00-00 00:00:00 |
|
+---------------------+
|
The year value could be preserved when NO_ZERO_IN_DATE is not set.
Attachments
Issue Links
- relates to
-
MDEV-9336 ALTER from DOUBLE to TIME returns a wrong result
- Open
-
MDEV-9344 Conversion from DOUBLE to DATETIME is inconsistent
- Open
-
MDEV-16926 CAST(COALESCE(year_field)) returns wrong value
- Closed