mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-05-28 13:01:26 +03:00
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.
16 lines
378 B
Plaintext
16 lines
378 B
Plaintext
DROP DATABASE IF EXISTS mcs115_db;
|
|
CREATE DATABASE mcs115_db;
|
|
USE mcs115_db;
|
|
CREATE TABLE t1 (a INT, b CHAR(1))ENGINE=Columnstore;
|
|
INSERT INTO t1 VALUES(NULL, ''),(1, 'z'),(2, 'y'),(1, 'y'),(2, 'z'),(3, 'z');
|
|
SELECT COUNT(a) FROM t1;
|
|
COUNT(a)
|
|
5
|
|
SELECT COUNT(DISTINCT a) FROM t1;
|
|
COUNT(DISTINCT a)
|
|
3
|
|
SELECT COUNT(DISTINCT b) FROM t1;
|
|
COUNT(DISTINCT b)
|
|
3
|
|
DROP DATABASE mcs115_db;
|