Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8513

Redundant warning on storing '1E1000' into a FLOAT column

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.0, 5.5
    • Fix Version/s: 10.0
    • Component/s: OTHER
    • 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.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: