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

MAX(old_decimal) produces a column of the old DECIMAL type

    Details

      Description

      I add this code into type_decimal.test.

      let $MYSQLD_DATADIR= `select @@datadir`;
       
      --copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1dec102.frm
      --copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1dec102.MYD
      --copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1dec102.MYI
       
      CREATE TABLE t1 AS SELECT MAX(a) FROM t1dec102;
      SHOW CREATE TABLE t1;
      DROP TABLE t1;
      

      It adds the following output to the test result:

      CREATE TABLE t1 AS SELECT MAX(a) FROM t1dec102;
      SHOW CREATE TABLE t1;
      Table	Create Table
      t1	CREATE TABLE `t1` (
        `MAX(a)` decimal(10,2)/*old*/ DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1
      DROP TABLE t1;
      

      Notice, a field of the "old" decimal type was created. It should create the new decimal variant.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: