mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-20 09:07:44 +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.
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
#
|
|
# Test MD5() function
|
|
# Author: Bharath, bharath.bokka@mariadb.com
|
|
#
|
|
-- source ../include/have_columnstore.inc
|
|
|
|
--disable_warnings
|
|
DROP DATABASE IF EXISTS mcs218_db;
|
|
--enable_warnings
|
|
|
|
CREATE DATABASE mcs218_db;
|
|
USE mcs218_db;
|
|
|
|
CREATE TABLE t1
|
|
(
|
|
t1_BIGINT BIGINT,
|
|
t1_DOUBLE DOUBLE,
|
|
t1_FLOAT FLOAT,
|
|
t1_BLOB BLOB,
|
|
t1_TEXT TEXT,
|
|
t1_CHAR_1 CHAR(1),
|
|
t1_DATETIME DATETIME
|
|
)ENGINE=Columnstore;
|
|
INSERT INTO t1 VALUES(NULL, NULL, NULL, NULL, NULL, NULL, '0-0-0');
|
|
INSERT INTO t1 VALUES(203685477580676, -3.797693231E+108, -7.402866E+18, repeat('b',10), repeat('b',10), 'b', '2387-11-08 11:22:30.123');
|
|
|
|
SELECT t1_BIGINT, MD5(t1_BIGINT) FROM t1 ORDER BY t1_BIGINT;
|
|
SELECT t1_DOUBLE, MD5(t1_DOUBLE) FROM t1 ORDER BY t1_DOUBLE;
|
|
SELECT t1_FLOAT, MD5(t1_FLOAT) FROM t1 ORDER BY t1_FLOAT;
|
|
SELECT t1_TEXT, MD5(t1_TEXT) FROM t1 ORDER BY t1_TEXT;
|
|
SELECT t1_CHAR_1, MD5(t1_CHAR_1) FROM t1 ORDER BY t1_CHAR_1;
|
|
SELECT t1_DATETIME, MD5(t1_DATETIME) FROM t1 ORDER BY t1_DATETIME;
|
|
SELECT t1_DATETIME FROM t1 WHERE MD5(t1_DATETIME) <> 0 ORDER BY t1_DATETIME;
|
|
|
|
# Clean UP
|
|
DROP DATABASE mcs218_db;
|