[MCOL-4496] INSERT..SELECT does not work for utf8 VARCHAR Created: 2021-01-14  Updated: 2021-01-29  Resolved: 2021-01-29

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

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-2000 varchar specified sizing is not in ch... Closed
Sprint: 2021-1, 2021-2

 Description   

This problem is repeatable in develop (and does not seem to repeat in develop-5).

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 VARCHAR(32) CHARACTER SET utf8) ENGINE=ColumnStore;
INSERT INTO t1 VALUES ('a'),('b');
SELECT * FROM t1;

+------+
| c1   |
+------+
| a    |
| b    |
+------+

Looks fine so far.

DROP TABLE IF EXISTS t2;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 SELECT c1 FROM t1;
SELECT * FROM t2;

+------+
| c1   |
+------+
| NULL |
| NULL |
+------+

Looks wrong. This query is expected to return the same result set with the previous query.

Note, if I change the data type from VARCHAR(32) CHARACTER SET utf8 to

  • CHAR(32) CHARACTER SET utf8, or
  • VARCHAR(32) CHARACTER SET latin1

it starts to return correct results.



 Comments   
Comment by Roman [ 2021-01-19 ]

Plz review.

Comment by Roman [ 2021-01-20 ]

4QA the case is covered by basic/mcol_2000 and basic/mcs38_select_limit.

Comment by Daniel Lee (Inactive) [ 2021-01-29 ]

Build verified: 6.1.1 (Drone b1583)

Verified the fix in the develop branch

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