You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-271 empty strings should not be NULLs (#2794)
This patch improves handling of NULLs in textual fields in ColumnStore. Previously empty strings were considered NULLs and it could be a problem if data scheme allows for empty strings. It was also one of major reasons of behavior difference between ColumnStore and other engines in MariaDB family. Also, this patch fixes some other bugs and incorrect behavior, for example, incorrect comparison for "column <= ''" which evaluates to constant True for all purposes before this patch.
This commit is contained in:
committed by
Roman Nozdrin
parent
0ea592da80
commit
b53c231ca6
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs285_db;
|
||||
CREATE DATABASE mcs285_db;
|
||||
USE mcs285_db;
|
||||
CREATE TABLE t1 (a INT, b CHAR(15))ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES (NULL, ''),(1, 'mariadb'),(2, 'columnstore'),(3, 'Innodb');
|
||||
INSERT INTO t1 VALUES (NULL, NULL),(1, 'mariadb'),(2, 'columnstore'),(3, 'Innodb');
|
||||
SELECT RIGHT('mariadb cs', 2) FROM t1 LIMIT 1;
|
||||
RIGHT('mariadb cs', 2)
|
||||
cs
|
||||
@ -15,9 +15,9 @@ b cs
|
||||
SELECT b, RIGHT(b, 0) FROM t1 ORDER BY 1;
|
||||
b RIGHT(b, 0)
|
||||
NULL NULL
|
||||
columnstore NULL
|
||||
Innodb NULL
|
||||
mariadb NULL
|
||||
columnstore
|
||||
Innodb
|
||||
mariadb
|
||||
SELECT b, RIGHT(b, -1) FROM t1 ORDER BY 1;
|
||||
b RIGHT(b, -1)
|
||||
NULL NULL
|
||||
|
Reference in New Issue
Block a user