Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 5.5.1
-
Fix Version/s: 23.02
-
Component/s: PrimProc
-
Labels:None
-
Epic Link:
-
Sprint:2021-5, 2021-6
Description
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a CHAR(2) DEFAULT '') ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (''); |
INSERT INTO t1 VALUES (' '); |
INSERT INTO t1 VALUES (' '); |
SELECT HEX(a) FROM t1; |
+--------+
|
| HEX(a) |
|
+--------+
|
| NULL |
|
| NULL |
|
| NULL |
|
+--------+
|
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a CHAR(2) DEFAULT 'aa') ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (''); |
INSERT INTO t1 VALUES (' '); |
INSERT INTO t1 VALUES (' '); |
SELECT HEX(a) FROM t1; |
+--------+
|
| HEX(a) |
|
+--------+
|
| NULL |
|
| NULL |
|
| NULL |
|
+--------+
|
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a CHAR(2) DEFAULT ' ') ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (''); |
INSERT INTO t1 VALUES (' '); |
INSERT INTO t1 VALUES (' '); |
SELECT HEX(a) FROM t1; |
+--------+
|
| HEX(a) |
|
+--------+
|
| NULL |
|
| NULL |
|
| NULL |
|
+--------+
|
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a CHAR(2) DEFAULT ' ') ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (''); |
INSERT INTO t1 VALUES (' '); |
INSERT INTO t1 VALUES (' '); |
SELECT HEX(a) FROM t1; |
+--------+
|
| HEX(a) |
|
+--------+
|
| NULL |
|
| NULL |
|
| NULL |
|
+--------+
|
In all above cases, empty strings as well as strings consisting only of space characters were replaced to NULL. Looks wrong.
Also, inserting an empty string should:
- either store NULL for now (like it does)
- or store the true empty string (when we fix the flaw that an empty string is NULL)