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 mcs219_db;
|
||||
CREATE DATABASE mcs219_db;
|
||||
USE mcs219_db;
|
||||
CREATE TABLE t1 (a INT, b CHAR(35))ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES (NULL, ''),(1, 'columnstore engine'),(2, 'mariadb database');
|
||||
INSERT INTO t1 VALUES (NULL, NULL),(1, 'columnstore engine'),(2, 'mariadb database');
|
||||
SELECT b, MID(b,4,5) FROM t1;
|
||||
b MID(b,4,5)
|
||||
NULL NULL
|
||||
@ -56,21 +56,21 @@ mariadb database ariadb database
|
||||
SELECT b, MID(b,0,0) FROM t1;
|
||||
b MID(b,0,0)
|
||||
NULL NULL
|
||||
columnstore engine NULL
|
||||
mariadb database NULL
|
||||
columnstore engine
|
||||
mariadb database
|
||||
SELECT b, MID(b,1,0) FROM t1;
|
||||
b MID(b,1,0)
|
||||
NULL NULL
|
||||
columnstore engine NULL
|
||||
mariadb database NULL
|
||||
columnstore engine
|
||||
mariadb database
|
||||
SELECT b, MID(b,0,1) FROM t1;
|
||||
b MID(b,0,1)
|
||||
NULL NULL
|
||||
columnstore engine NULL
|
||||
mariadb database NULL
|
||||
columnstore engine
|
||||
mariadb database
|
||||
SELECT b, MID(b,-1,0) FROM t1;
|
||||
b MID(b,-1,0)
|
||||
NULL NULL
|
||||
columnstore engine NULL
|
||||
mariadb database NULL
|
||||
columnstore engine
|
||||
mariadb database
|
||||
DROP DATABASE mcs219_db;
|
||||
|
Reference in New Issue
Block a user