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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
    • 10.4
    • OTHER
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.