Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a YEAR);
|
INSERT INTO t1 VALUES (-0.1);
|
SHOW WARNINGS;
|
correctly reports warnings:
+---------+------+--------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+--------------------------------------------+
|
| Warning | 1264 | Out of range value for column 'a' at row 1 |
|
+---------+------+--------------------------------------------+
|
So does copying:
DROP TABLE IF EXISTS t1,t2;
|
CREATE TABLE t1 (a YEAR);
|
CREATE TABLE t2 (a DECIMAL(10,1));
|
INSERT INTO t2 VALUES (-0.1);
|
INSERT INTO t1 SELECT * FROM t2;
|
SHOW WARNINGS;
|
While ALTER does not return any warnings:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a DECIMAL(10,1));
|
INSERT INTO t1 VALUES (-0.1);
|
ALTER TABLE t1 MODIFY a YEAR;
|
SHOW WARNINGS;
|
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
-
- Closed
-
Activity
Description |
{code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a YEAR); INSERT INTO t1 VALUES (-0.1); SHOW WARNINGS; {code} correctly reports warnings: {noformat} +---------+------+--------------------------------------------+ | Level | Code | Message | +---------+------+--------------------------------------------+ | Warning | 1264 | Out of range value for column 'a' at row 1 | +---------+------+--------------------------------------------+ {noformat} While ALTER does not return any warnings: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1)); INSERT INTO t1 VALUES (-0.1); ALTER TABLE t1 MODIFY a YEAR; SHOW WARNINGS; {code} |
{code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a YEAR); INSERT INTO t1 VALUES (-0.1); SHOW WARNINGS; {code} correctly reports warnings: {noformat} +---------+------+--------------------------------------------+ | Level | Code | Message | +---------+------+--------------------------------------------+ | Warning | 1264 | Out of range value for column 'a' at row 1 | +---------+------+--------------------------------------------+ {noformat} So does copying: {code} DROP TABLE IF EXISTS t1,t2; CREATE TABLE t1 (a YEAR); CREATE TABLE t2 (a DECIMAL(10,1)); INSERT INTO t2 VALUES (-0.1); INSERT INTO t1 SELECT * FROM t2; SHOW WARNINGS; {code} While ALTER does not return any warnings: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1)); INSERT INTO t1 VALUES (-0.1); ALTER TABLE t1 MODIFY a YEAR; SHOW WARNINGS; {code} |
Fix Version/s | 10.2.0 [ 20700 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 73603 ] | MariaDB v4 [ 149990 ] |
The same problem is repeatable when converting from DOUBLE to YEAR.