Commit f744b2a1 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-8283 crash in get_mm_leaf with xor on binary col

parent 93fc04ff
...@@ -2628,3 +2628,16 @@ alter table t1 drop partition if exists p5; ...@@ -2628,3 +2628,16 @@ alter table t1 drop partition if exists p5;
Warnings: Warnings:
Note 1507 Error in list of partitions to DROP Note 1507 Error in list of partitions to DROP
DROP TABLE t1; DROP TABLE t1;
#
# Start of 10.1 tests
#
#
# MDEV-8283 crash in get_mm_leaf with xor on binary col
#
CREATE TABLE t1(a BINARY(80)) PARTITION BY KEY(a) PARTITIONS 3;
SELECT 1 FROM t1 WHERE a XOR 'a';
1
DROP TABLE t1;
#
# End of 10.1 tests
#
...@@ -2884,3 +2884,17 @@ alter table t1 drop partition if exists p5; ...@@ -2884,3 +2884,17 @@ alter table t1 drop partition if exists p5;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # Start of 10.1 tests
--echo #
--echo #
--echo # MDEV-8283 crash in get_mm_leaf with xor on binary col
--echo #
CREATE TABLE t1(a BINARY(80)) PARTITION BY KEY(a) PARTITIONS 3;
SELECT 1 FROM t1 WHERE a XOR 'a';
DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
--echo #
...@@ -8370,8 +8370,8 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, ...@@ -8370,8 +8370,8 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
value->result_type() == STRING_RESULT && value->result_type() == STRING_RESULT &&
key_part->image_type == Field::itRAW && key_part->image_type == Field::itRAW &&
field->charset() != conf_func->compare_collation() && field->charset() != conf_func->compare_collation() &&
!(conf_func->compare_collation()->state & MY_CS_BINSORT && !((type == Item_func::EQUAL_FUNC || type == Item_func::EQ_FUNC) &&
(type == Item_func::EQUAL_FUNC || type == Item_func::EQ_FUNC))) conf_func->compare_collation()->state & MY_CS_BINSORT))
goto end; goto end;
if (value->cmp_type() == TIME_RESULT && field->cmp_type() != TIME_RESULT) if (value->cmp_type() == TIME_RESULT && field->cmp_type() != TIME_RESULT)
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment