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
fix(mcol-4499): Correct handling of LIKE/NOT LIKE NULL
This commit is contained in:
committed by
Leonid Fedorov
parent
3bb2496ca1
commit
0b0dd27fda
13
mysql-test/columnstore/bugfixes/mcol-4499-float-null.result
Normal file
13
mysql-test/columnstore/bugfixes/mcol-4499-float-null.result
Normal file
@ -0,0 +1,13 @@
|
||||
DROP DATABASE IF EXISTS `doubles_and_nulls`;
|
||||
CREATE DATABASE `doubles_and_nulls`;
|
||||
USE `doubles_and_nulls`;
|
||||
DROP TABLE IF EXISTS qatablefloat;
|
||||
CREATE TABLE qatablefloat (col float) engine=columnstore;
|
||||
INSERT INTO qatablefloat VALUES (null);
|
||||
INSERT INTO qatablefloat VALUES (null);
|
||||
INSERT INTO qatablefloat VALUES (null);
|
||||
DELETE FROM qatablefloat WHERE col IS NULL;
|
||||
SELECT * FROM qatablefloat;
|
||||
col
|
||||
DROP TABLE qatablefloat;
|
||||
DROP DATABASE `doubles_and_nulls`;
|
19
mysql-test/columnstore/bugfixes/mcol-4499-float-null.test
Normal file
19
mysql-test/columnstore/bugfixes/mcol-4499-float-null.test
Normal file
@ -0,0 +1,19 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS `doubles_and_nulls`;
|
||||
CREATE DATABASE `doubles_and_nulls`;
|
||||
USE `doubles_and_nulls`;
|
||||
|
||||
DROP TABLE IF EXISTS qatablefloat;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE qatablefloat (col float) engine=columnstore;
|
||||
INSERT INTO qatablefloat VALUES (null);
|
||||
INSERT INTO qatablefloat VALUES (null);
|
||||
INSERT INTO qatablefloat VALUES (null);
|
||||
DELETE FROM qatablefloat WHERE col IS NULL;
|
||||
SELECT * FROM qatablefloat;
|
||||
|
||||
DROP TABLE qatablefloat;
|
||||
DROP DATABASE `doubles_and_nulls`;
|
20
mysql-test/columnstore/bugfixes/mcol-4499.result
Normal file
20
mysql-test/columnstore/bugfixes/mcol-4499.result
Normal file
@ -0,0 +1,20 @@
|
||||
DROP DATABASE IF EXISTS `mcol_4499`;
|
||||
CREATE DATABASE `mcol_4499`;
|
||||
USE `mcol_4499`;
|
||||
DROP TABLE IF EXISTS twidevarchar;
|
||||
DROP TABLE IF EXISTS twidechar;
|
||||
CREATE TABLE twidevarchar (col VARCHAR(4)) ENGINE=ColumnStore;
|
||||
INSERT INTO twidevarchar VALUES (NULL),('a');
|
||||
SELECT col FROM twidevarchar WHERE col LIKE NULL;
|
||||
col
|
||||
SELECT col FROM twidevarchar WHERE col NOT LIKE NULL;
|
||||
col
|
||||
DROP TABLE twidevarchar;
|
||||
CREATE TABLE twidechar (col CHAR(5)) ENGINE=ColumnStore;
|
||||
INSERT INTO twidechar VALUES (NULL),('a');
|
||||
SELECT col FROM twidechar WHERE col LIKE NULL;
|
||||
col
|
||||
SELECT col FROM twidechar WHERE col NOT LIKE NULL;
|
||||
col
|
||||
DROP TABLE twidechar;
|
||||
DROP DATABASE `mcol_4499`;
|
27
mysql-test/columnstore/bugfixes/mcol-4499.test
Normal file
27
mysql-test/columnstore/bugfixes/mcol-4499.test
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# MCOL-4499 NOT LIKE NULL must not return any rows
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS `mcol_4499`;
|
||||
CREATE DATABASE `mcol_4499`;
|
||||
USE `mcol_4499`;
|
||||
DROP TABLE IF EXISTS twidevarchar;
|
||||
DROP TABLE IF EXISTS twidechar;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE twidevarchar (col VARCHAR(4)) ENGINE=ColumnStore;
|
||||
INSERT INTO twidevarchar VALUES (NULL),('a');
|
||||
SELECT col FROM twidevarchar WHERE col LIKE NULL;
|
||||
SELECT col FROM twidevarchar WHERE col NOT LIKE NULL;
|
||||
DROP TABLE twidevarchar;
|
||||
|
||||
CREATE TABLE twidechar (col CHAR(5)) ENGINE=ColumnStore;
|
||||
INSERT INTO twidechar VALUES (NULL),('a');
|
||||
SELECT col FROM twidechar WHERE col LIKE NULL;
|
||||
SELECT col FROM twidechar WHERE col NOT LIKE NULL;
|
||||
DROP TABLE twidechar;
|
||||
|
||||
DROP DATABASE `mcol_4499`;
|
Reference in New Issue
Block a user