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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5, 10.0, 10.1
    • Fix Version/s: 5.5.44
    • Component/s: OTHER
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: