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

Hybrid functions create a column of an impossible type DOUBLE(256,4)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1, 10.2, 10.3
    • 10.3.1
    • OTHER

    Description

      CREATE OR REPLACE TABLE t1 (a DOUBLE(255,4),b DOUBLE(255,3));
      CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(a,b) FROM t1;
      SHOW CREATE TABLE t2;
      

      +-------+---------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                            |
      +-------+---------------------------------------------------------------------------------------------------------+
      | t2    | CREATE TABLE `t2` (
        `COALESCE(a,b)` double(256,4) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
      +-------+---------------------------------------------------------------------------------------------------------+
      

      Notice, a column of an impossible type double(256,4) was created.

      If I try to create a column of the same type directly, I correctly get an error:

      CREATE OR REPLACE TABLE t1 (a DOUBLE(256,4));
      

      ERROR 1439 (42000): Display width out of range for 'a' (max = 255)
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.