mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-26 11:48:52 +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.
36 lines
705 B
Plaintext
36 lines
705 B
Plaintext
#
|
|
# Test ASCII function
|
|
# Author: Bharath, bharath.bokka@mariadb.com
|
|
#
|
|
-- source ../include/have_columnstore.inc
|
|
|
|
--disable_warnings
|
|
DROP DATABASE IF EXISTS mcs180_db;
|
|
--enable_warnings
|
|
|
|
CREATE DATABASE mcs180_db;
|
|
USE mcs180_db;
|
|
|
|
SET default_storage_engine=Columnstore;
|
|
|
|
CREATE TABLE t1 (a CHAR(1), b INT);
|
|
INSERT INTO t1 VALUES (NULL, NULL), ('m', 6), ('N', 5), ('o', 4);
|
|
--replace_regex /( COLLATE=latin1_swedish_ci)//
|
|
SHOW CREATE TABLE t1;
|
|
|
|
SELECT ASCII(0);
|
|
SELECT ASCII(1);
|
|
SELECT ASCII(9);
|
|
SELECT ASCII('abc');
|
|
SELECT ASCII('a');
|
|
SELECT ASCII('A');
|
|
SELECT ASCII('z');
|
|
SELECT ASCII('~');
|
|
SELECT ASCII('-');
|
|
|
|
SELECT a, ASCII(a) FROM t1;
|
|
SELECT b, ASCII(b) FROM t1;
|
|
|
|
# Clean UP
|
|
DROP DATABASE mcs180_db;
|