[MCOL-5579] Loading into Columnstore from SELECT changes values Created: 2023-09-19  Updated: 2023-12-13  Resolved: 2023-09-20

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 6.3.1, 23.02.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Edward Stoever Assignee: Daniel Lee (Inactive)
Resolution: Duplicate Votes: 0
Labels: triage

Issue Links:
Duplicate
duplicates MCOL-5480 LDI loads values incorrectly for MEDI... Closed

 Description   

create table innotab(
`col1` mediumint(8) unsigned NOT NULL,
`col2` decimal(9,2) DEFAULT NULL) 
ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
insert into innotab (col1,col2) values(999,888.88);
 
create table cstab (
`col1` mediumint(8) unsigned NOT NULL,
`col2` decimal(9,2) DEFAULT NULL) 
ENGINE=Columnstore DEFAULT CHARSET=latin1;
 
set session columnstore_use_import_for_batchinsert=ALWAYS;
 
insert into cstab select * from innotab;
 
ERROR 9999 (HY000): Values saturated
 
MariaDB [test]> select * from innotab;
+------+--------+
| col1 | col2   |
+------+--------+
|  999 | 888.88 |
+------+--------+
1 row in set (0.000 sec)
 
MariaDB [test]> select * from cstab;
+----------+-------------+
| col1     | col2        |
+----------+-------------+
| 16777215 | -9999999.99 |
+----------+-------------+
1 row in set (0.006 sec)



 Comments   
Comment by Todd Stoffel (Inactive) [ 2023-09-19 ]

Edward I cannot reproduce in 23.02.4

Can you try a newer release?

MariaDB [bugs]> create table innotab(
    -> `col1` mediumint(8) unsigned NOT NULL,
    -> `col2` decimal(9,2) DEFAULT NULL)
    -> ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.013 sec)
 
MariaDB [bugs]> insert into innotab (col1,col2) values(999,888.88);
Query OK, 1 row affected (0.003 sec)
 
MariaDB [bugs]> create table cstab (
    -> `col1` mediumint(8) unsigned NOT NULL,
    -> `col2` decimal(9,2) DEFAULT NULL)
    -> ENGINE=Columnstore DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.149 sec)
 
MariaDB [bugs]> set session columnstore_use_import_for_batchinsert=ALWAYS;
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [bugs]> insert into cstab select * from innotab;
Query OK, 1 row affected (1.477 sec)
Records: 1  Duplicates: 0  Warnings: 0
 
MariaDB [bugs]> select * from innotab;
+------+--------+
| col1 | col2   |
+------+--------+
|  999 | 888.88 |
+------+--------+
1 row in set (0.001 sec)
 
MariaDB [bugs]> select * from cstab;
+------+--------+
| col1 | col2   |
+------+--------+
|  999 | 888.88 |
+------+--------+
1 row in set (0.044 sec)

Comment by Daniel Lee (Inactive) [ 2023-09-20 ]

The reported issue was reproduced in 23.02.2, 23.02.3 and 6.4.7-1.

When columnstore_use_import_for_batchinsert is set to ON or ALWAYS,
"insert into cstab select" and LDI shows the reported issue.

Both work correctly when columnstore_use_import_for_batchinsert is set to OFF.

INSERT and UPDATE are ok
cpimport itself is also ok

23.02.4, as well as the latest of the develop branch, do not have the issue.
Mostly, the issue was fixed by https://jira.mariadb.org/browse/MCOL-5480, which was released in 23.03.4.

Comment by Daniel Lee (Inactive) [ 2023-09-20 ]

The ticket is a duplicate of MCOL-5480, which was released in 23.02.4.

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