[MDEV-8513] Redundant warning on storing '1E1000' into a FLOAT column Created: 2015-07-21  Updated: 2019-04-02

Status: Open
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('1E1000');
SHOW WARNINGS;

returns two warnings:

+---------+------+--------------------------------------------+
| Level   | Code | Message                                    |
+---------+------+--------------------------------------------+
| Warning | 1264 | Out of range value for column 'a' at row 1 |
| Warning | 1264 | Out of range value for column 'a' at row 1 |
+---------+------+--------------------------------------------+

One warning would be enough.

If I futher do:

UPDATE t1 SET a='1E1000';

it reports:

Rows matched: 1  Changed: 0  Warnings: 2

which makes an impression that truncation happened on two rows, while in fact only one row was affected.


Generated at Thu Feb 08 07:27:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.