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

Add /*old*/ comment into I_S.COLUMN_TYPE for old DECIMAL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 5.5.44
    • OTHER
    • None

    Description

      Currently there is no an easy way to distinguish between an old DECIMAL data type the new DECIMAL which was introduced in 5.5

      The old column type is not automatically converted to the new data type on upgrade because of some incompatibility in the supported precision and scale ranges.

      Some users still have old DECIMAL in their 10.0 installations after a set upgrades made in different years (to 5.0, 5.1, 5.5 and finally to 10.0) and even don't know about presence of such column!

      We will add the "/*old*/" comment into the column type.

      • In INFORMATION_SCHEMA:

        MariaDB [test]> SELECT DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME='a';
        +-----------+----------------------+
        | DATA_TYPE | COLUMN_TYPE          |
        +-----------+----------------------+
        | decimal   | decimal(10,2)/*old*/ |
        +-----------+----------------------+

      • In SHOW COLUMNS:

        MariaDB [test]> SHOW COLUMNS FROM dec102;
        +-------+----------------------+------+-----+---------+-------+
        | Field | Type                 | Null | Key | Default | Extra |
        +-------+----------------------+------+-----+---------+-------+
        | a     | decimal(10,2)/*old*/ | YES  |     | NULL    |       |
        +-------+----------------------+------+-----+---------+-------+

      • SHOW CREATE TABLE

        MariaDB [test]> SHOW CREATE TABLE dec102;
        +--------+--------------------------------------------------------------------------------------------------------+
        | Table  | Create Table                                                                                           |
        +--------+--------------------------------------------------------------------------------------------------------+
        | dec102 | CREATE TABLE `dec102` (
          `a` decimal(10,2)/*old*/ DEFAULT NULL
        ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
        +--------+--------------------------------------------------------------------------------------------------------+

      Attachments

        Issue Links

          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.