Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
This script:
SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.000000'); |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(30,0)); |
INSERT INTO t1 VALUES (CURRENT_TIMESTAMP(6)); |
SELECT * FROM t1; |
returns:
+----------------+
|
| a |
|
+----------------+
|
| 20010101102030 |
|
+----------------+
|
This is correct.
Now if I do:
SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.000000'); |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(30,0)); |
INSERT INTO t1 VALUES (COALESCE(CURRENT_TIMESTAMP(6))); |
SELECT * FROM t1; |
it generates a warning on INSERT, and returns:
+------+
|
| a |
|
+------+
|
| 2001 |
|
+------+
|
Attachments
Issue Links
- is blocked by
-
MDEV-11337 Split Item::save_in_field() into virtual methods in Type_handler
- Closed