[MDEV-12574] MAX(old_decimal) produces a column of the old DECIMAL type Created: 2017-04-24  Updated: 2018-07-09  Resolved: 2018-06-27

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.2.16, 10.3.8, 10.4.0

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
Relates
relates to MDEV-16542 Fix ALTER TABLE FORCE to upgrade temp... Closed

 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.


Generated at Thu Feb 08 07:58:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.