[MCOL-341] mts_insert_select producing bad results Created: 2016-10-03  Updated: 2016-10-03  Resolved: 2016-10-03

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.0.3
Fix Version/s: 1.0.4

Type: Bug Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: David Hall (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MCOL-280 Beta issues Closed
Sprint: 2016-19

 Description   

INSERT...SELECT failing on a date field when there are multiple date fields...



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2016-10-03 ]

Simplified test case:

create table t1 (a datetime, b datetime, c datetime, d datetime) engine=columnstore;
create table t2 (a datetime, b datetime, c datetime, d datetime) engine=columnstore;
insert into t1 values ('2003-07-18 00:11:21', NULL, NULL, 20030718001121);
insert into t2 select a, b, c, d from t1 limit 1;
Query OK, 1 row affected, 1 warning (2.10 sec)     
Records: 1  Duplicates: 0  Warnings: 1
 
MariaDB [test]> show warnings;
+---------+------+------------------+
| Level   | Code | Message          |
+---------+------+------------------+
| Warning | 9999 | Values saturated |
+---------+------+------------------+
1 row in set (0.00 sec)

Simplifying it more caused more (very likely related) problems:

MariaDB [test]> create table t1 (a datetime, b datetime, c datetime) engine=columnstore;
Query OK, 0 rows affected (0.50 sec)
 
MariaDB [test]> create table t2 (a datetime, b datetime, c datetime) engine=columnstore;
Query OK, 0 rows affected (0.22 sec)
 
MariaDB [test]> insert into t1 values ('2003-07-18 00:11:21', NULL, 20030718001121);
Query OK, 1 row affected (0.48 sec)
 
MariaDB [test]> insert into t2 select a, b from t1 limit 1;
ERROR 1136 (21S01): Column count doesn't match value count at row 1
MariaDB [test]> insert into t2 select a, b, c from t1 limit 1;
ERROR 1815 (HY000): Internal error: Lost connection to ExeMgr while fetching: Row::isNullValue(): got bad column type (954221984).  Width=955062096
0: 563922472216297472 NULL 

Comment by Andrew Hutchings (Inactive) [ 2016-10-03 ]

Can be closed straight after, this fixes test005

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