You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Merge pull request #1938 from mariadb-corporation/bar-develop-MCOL-4276
MCOL-4726 Wrong result of WHERE char1_col='A'
This commit is contained in:
@ -1,8 +1,34 @@
|
||||
--source ../include/have_columnstore.inc
|
||||
--source ctype_cmp_combinations.inc
|
||||
--source ctype_cmp_create.inc
|
||||
|
||||
SET NAMES utf8;
|
||||
|
||||
|
||||
SET @datatype='CHAR(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci';
|
||||
|
||||
CREATE TABLE t1 (c1 CHAR(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci);
|
||||
|
||||
CALL test01_populate(1,1);
|
||||
CALL test01_field_literal(1,2);
|
||||
CALL test01_field_field();
|
||||
CALL test01_distinct();
|
||||
DROP TABLE t1;
|
||||
|
||||
CALL test02_same_table_create_table(@datatype);
|
||||
CALL test02_same_table_populate();
|
||||
CALL test02_same_table_cmp_field_field();
|
||||
DROP TABLE t1;
|
||||
|
||||
CALL test03(1, @datatype);
|
||||
|
||||
CALL test04_like(1, @datatype);
|
||||
|
||||
CALL test05_mcol4726(1, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MCOL-4721 CHAR(1) is not collation-aware for GROUP/DISTINCT
|
||||
--echo #
|
||||
@ -15,3 +41,12 @@ INSERT INTO t1 VALUES ('ä'),('Ä'),('ã'),('Ã');
|
||||
SELECT c1, COUNT(*) FROM t1 GROUP BY c1 ORDER BY c1;
|
||||
SELECT DISTINCT c1 FROM t1 ORDER BY c1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MCOL-4726 Wrong result of WHERE char1_col='A'
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a CHAR(1) CHARACTER SET latin1);
|
||||
INSERT INTO t1 VALUES ('a'),('Ã');
|
||||
SELECT * FROM t1 WHERE a='A';
|
||||
DROP TABLE t1;
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4, @datatype);
|
||||
|
||||
CALL test04_like(4, @datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(5, @datatype);
|
||||
|
||||
CALL test04_like(5, @datatype);
|
||||
|
||||
CALL test05_mcol4726(5, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -227,3 +227,37 @@ BEGIN
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
|
||||
DELIMITER $$;
|
||||
CREATE PROCEDURE test05_mcol4726(len INT, datatype TEXT)
|
||||
BEGIN
|
||||
DECLARE small_a VARCHAR(64) CHARACTER SET utf8 DEFAULT REPEAT('a',len);
|
||||
DECLARE cap_a VARCHAR(64) CHARACTER SET utf8 DEFAULT REPEAT('A',len);
|
||||
DECLARE small_a_with_tilde VARCHAR(64) CHARACTER SET utf8 DEFAULT REPEAT(_latin1 0xE3,len);
|
||||
DECLARE cap_a_with_tilde VARCHAR(64) CHARACTER SET utf8 DEFAULT REPEAT(_latin1 0xC3,len);
|
||||
DECLARE small_a_with_diaeresis VARCHAR(64) CHARACTER SET utf8 DEFAULT REPEAT(_latin1 0xE4,len);
|
||||
DECLARE cap_a_with_diaeresis VARCHAR(64) CHARACTER SET utf8 DEFAULT REPEAT(_latin1 0xC4,len);
|
||||
DECLARE ins VARCHAR(64) CHARACTER SET utf8 DEFAULT 'INSERT INTO t1 VALUES(IVAL)';
|
||||
DECLARE sel VARCHAR(64) CHARACTER SET utf8 DEFAULT 'SELECT c1 FROM t1 WHERE c1=IVAL ORDER BY BINARY c1';
|
||||
|
||||
CALL exec(REPLACE('CREATE TABLE t1 (c1 DATATYPE)', 'DATATYPE', datatype));
|
||||
CALL exec(REPLACE(ins, 'IVAL', CONCAT('''', small_a, '''')));
|
||||
CALL exec(REPLACE(ins, 'IVAL', CONCAT('''', cap_a, '''')));
|
||||
CALL exec(REPLACE(ins, 'IVAL', CONCAT('''', small_a_with_tilde, '''')));
|
||||
CALL exec(REPLACE(ins, 'IVAL', CONCAT('''', cap_a_with_tilde, '''')));
|
||||
CALL exec(REPLACE(ins, 'IVAL', CONCAT('''', small_a_with_diaeresis, '''')));
|
||||
CALL exec(REPLACE(ins, 'IVAL', CONCAT('''', cap_a_with_diaeresis, '''')));
|
||||
|
||||
CALL exec(REPLACE(sel, 'IVAL', CONCAT('''', small_a, '''')));
|
||||
CALL exec(REPLACE(sel, 'IVAL', CONCAT('''', cap_a, '''')));
|
||||
CALL exec(REPLACE(sel, 'IVAL', CONCAT('''', small_a_with_tilde, '''')));
|
||||
CALL exec(REPLACE(sel, 'IVAL', CONCAT('''', cap_a_with_tilde, '''')));
|
||||
CALL exec(REPLACE(sel, 'IVAL', CONCAT('''', small_a_with_diaeresis, '''')));
|
||||
CALL exec(REPLACE(sel, 'IVAL', CONCAT('''', cap_a_with_diaeresis, '''')));
|
||||
|
||||
CALL exec('DROP TABLE t1');
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
|
@ -11,6 +11,7 @@ DROP PROCEDURE test02_same_table_cmp_field_field_op;
|
||||
DROP PROCEDURE test02_same_table_cmp_field_field;
|
||||
DROP PROCEDURE test03;
|
||||
DROP PROCEDURE test04_like;
|
||||
DROP PROCEDURE test05_mcol4726;
|
||||
EXECUTE IMMEDIATE CONCAT('DROP DATABASE ', @database);
|
||||
USE test;
|
||||
SET @@default_storage_engine=DEFAULT;
|
||||
|
@ -24,4 +24,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -22,4 +22,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -22,4 +22,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -22,4 +22,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(32,@datatype);
|
||||
|
||||
CALL test04_like(32,@datatype);
|
||||
|
||||
CALL test05_mcol4726(32, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -22,4 +22,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -22,4 +22,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -22,4 +22,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
@ -23,4 +23,6 @@ CALL test03(4,@datatype);
|
||||
|
||||
CALL test04_like(4,@datatype);
|
||||
|
||||
CALL test05_mcol4726(4, @datatype);
|
||||
|
||||
--source ctype_cmp_drop.inc
|
||||
|
Reference in New Issue
Block a user