[MCOL-270] MEDIUMINT data type not supported Created: 2016-08-18  Updated: 2019-09-12  Resolved: 2019-09-12

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: None
Fix Version/s: 1.4.0

Type: New Feature Priority: Minor
Reporter: Andrew Hutchings (Inactive) Assignee: Bharath Bokka (Inactive)
Resolution: Fixed Votes: 2
Labels: contribution, relnote

Epic Link: ColumnStore Compatibility Improvements
Sprint: 2019-06

 Description   

Not supported in Columnstore



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2019-01-15 ]

Community contribution merged. We need tests written in the regression suite for this. elena.kotsinova, dleeyh who should be assigned this?

Comment by Bharath Bokka (Inactive) [ 2019-09-12 ]

MEDIUMINT data type is now supported on 1.4.0-1.

Git version info-
server commit:
67452bc
engine commit:
4d2a159

Following are the examples of tests on MEDIUMINT datatype:
MariaDB [mytest]> create table t2 (col1 mediumint) ENGINE=columnstore;
Query OK, 0 rows affected (0.646 sec)

MariaDB [mytest]> show create table t2 ;
---------------------------------------------------------------------------------------------------------+

Table Create Table

---------------------------------------------------------------------------------------------------------+

t2 CREATE TABLE `t2` (
`col1` mediumint(9) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1

---------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

MariaDB [mytest]>
MariaDB [mytest]> insert into t2 values (0);
Query OK, 1 row affected (0.180 sec)

MariaDB [mytest]> insert into t2 values (16777215);
Query OK, 1 row affected, 1 warning (0.091 sec)

MariaDB [test]> insert into t2 values(-1);
Query OK, 1 row affected, 1 warning (0.165 sec)

MariaDB [mytest]> insert into t2 values (-8388609);
Query OK, 1 row affected, 1 warning (0.159 sec)

MariaDB [mytest]> select * from t2;
----------

col1

----------

0
8388607
-8388608
-1

----------
3 rows in set (0.012 sec)

MariaDB [test]> create table t(col1 mediumint unsigned) engine=columnstore;
Query OK, 0 rows affected (0.418 sec)

MariaDB [test]> show create table t;
-----------------------------------------------------------------------------------------------------------------+

Table Create Table

-----------------------------------------------------------------------------------------------------------------+

t CREATE TABLE `t` (
`col1` mediumint(8) unsigned DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1

-----------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

MariaDB [test]> insert into t values();
Query OK, 1 row affected (0.216 sec)

MariaDB [test]> insert into t values('');
Query OK, 1 row affected, 1 warning (0.125 sec)

MariaDB [test]> insert into t values(16777215);
Query OK, 1 row affected (0.186 sec)

MariaDB [test]> insert into t values(16777216);
Query OK, 1 row affected, 1 warning (0.152 sec)

MariaDB [test]> insert into t values(-1);
Query OK, 1 row affected, 1 warning (0.165 sec)

MariaDB [test]> insert into t values(0);
Query OK, 1 row affected (0.170 sec)

MariaDB [test]> insert into t values(1);
Query OK, 1 row affected (0.095 sec)

MariaDB [test]> select * from t;
----------

col1

----------

NULL
0
16777215
16777215
0
0
1

----------
7 rows in set (0.108 sec)
MariaDB [test]> select count from t where col1= 0;
----------

count

----------

3

----------
1 row in set (0.014 sec)

MariaDB [test]> select avg(col1) from t;
--------------

avg(col1)

--------------

5592405.1667

--------------
1 row in set (0.031 sec)

MariaDB [test]> select * from t2 where col1<0 order by col1 desc;
----------

col1

----------

-1
-8388608

----------
2 rows in set (0.015 sec)

The datatype works as expected.

Generated at Thu Feb 08 02:19:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.