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

Redundant NOTE when inserting '0.00001 ' into a DECIMAL(2,1) column

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1
    • 10.1.15
    • OTHER
    • None

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(2,1));
      INSERT INTO t1 VALUES ('0.00001 ');
      SHOW WARNINGS;
      

      +-------+------+----------------------------------------+
      | Level | Code | Message                                |
      +-------+------+----------------------------------------+
      | Note  | 1265 | Data truncated for column 'a' at row 1 |
      | Note  | 1265 | Data truncated for column 'a' at row 1 |
      +-------+------+----------------------------------------+
      

      The first note is generated because fractional digits do not fit.
      The second note is generated because of the trailing space.

      One note should be enough.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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