Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL)
-
None
Description
These two scripts:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a DATETIME);
|
INSERT INTO t1 VALUES (1000);
|
SELECT * FROM t1;
|
DROP TABLE IF EXISTS t1,t2;
|
CREATE TABLE t1 (a DATETIME);
|
CREATE TABLE t2 (a INT);
|
INSERT INTO t2 VALUES (1000);
|
INSERT INTO t1 SELECT * FROM t2;
|
SELECT * FROM t1;
|
return
+---------------------+
|
| a |
|
+---------------------+
|
| 2000-10-00 00:00:00 |
|
+---------------------+
|
This script:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a INT);
|
INSERT INTO t1 VALUES (1000);
|
ALTER TABLE t1 MODIFY a DATETIME;
|
SELECT * FROM t1;
|
returns a different result:
+---------------------+
|
| a |
|
+---------------------+
|
| 0000-00-00 00:00:00 |
|
+---------------------+
|
All three cases are expected to return the same result.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed