1
0
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:
Sergey Zefirov
2023-03-30 17:26:45 +01:00
committed by Roman Nozdrin
parent 0ea592da80
commit b53c231ca6
417 changed files with 12459 additions and 3520 deletions

View File

@ -38,7 +38,7 @@ t1_int t1_char t2_int t2_char
3 ccc 3 iii
5 eee 5 jjj
7 gggg 7 llll
NULL NULL NULL NULL
NULL NULL NULL
2 bbb NULL NULL
4 ddd NULL NULL
6 fff NULL NULL
@ -63,7 +63,7 @@ select `mcs63_db`.`t1`.`t1_int` AS `t1_int`,`mcs63_db`.`t1`.`t1_char` AS `t1_cha
SELECT * FROM v4;
t1_int t1_char t2_int t2_char
1 aaa 1 hhh
NULL NULL NULL NULL
NULL NULL NULL
2 bbb NULL NULL
3 ccc NULL NULL
4 ddd NULL NULL
@ -76,7 +76,7 @@ VIEW_DEFINITION
select `mcs63_db`.`t1`.`t1_int` AS `t1_int`,`mcs63_db`.`t1`.`t1_char` AS `t1_char`,`mcs63_db`.`t2`.`t2_int` AS `t2_int`,`mcs63_db`.`t2`.`t2_char` AS `t2_char` from (`mcs63_db`.`t2` left join `mcs63_db`.`t1` on(`mcs63_db`.`t1`.`t1_int` = `mcs63_db`.`t2`.`t2_int`))
SELECT * FROM v5;
t1_int t1_char t2_int t2_char
NULL NULL NULL NULL
NULL NULL NULL
1 aaa 1 hhh
3 ccc 3 iii
5 eee 5 jjj
@ -90,7 +90,7 @@ VIEW_DEFINITION
select `mcs63_db`.`t1`.`t1_char` AS `t1_char`,`mcs63_db`.`t2`.`t2_char` AS `t2_char` from (`mcs63_db`.`t2` left join `mcs63_db`.`t1` on(`mcs63_db`.`t1`.`t1_int` = `mcs63_db`.`t2`.`t2_int`))
SELECT * FROM v6;
t1_char t2_char
NULL NULL
NULL
aaa hhh
ccc iii
eee jjj
@ -104,7 +104,7 @@ VIEW_DEFINITION
select `mcs63_db`.`t1`.`t1_int` AS `t1_int`,`mcs63_db`.`t1`.`t1_char` AS `t1_char`,`mcs63_db`.`t2`.`t2_int` AS `t2_int`,`mcs63_db`.`t2`.`t2_char` AS `t2_char` from (`mcs63_db`.`t2` left join `mcs63_db`.`t1` on(`mcs63_db`.`t1`.`t1_int` = `mcs63_db`.`t2`.`t2_int` and `mcs63_db`.`t2`.`t2_int` = 5))
SELECT * FROM v7;
t1_int t1_char t2_int t2_char
NULL NULL NULL NULL
NULL NULL NULL
NULL NULL 1 hhh
NULL NULL 3 iii
5 eee 5 jjj