Commit 777c2131 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-9862 Illegal mix of collation, when comparing column with CASE expression

parent 11b77e9b
#
# Start of 5.5 tests
#
#
# MDEV-9862 Illegal mix of collation, when comparing column with CASE expression
#
SET NAMES cp850;
CREATE TABLE t1 (a CHAR(1) CHARACTER SET latin1);
SELECT a FROM t1 WHERE CASE a WHEN 'aaaa' THEN 'Y' WHEN 'aaaa' THEN 'Y' ELSE NULL END <> a;
a
DROP TABLE t1;
#
# End of 5.5 tests
#
--echo #
--echo # Start of 5.5 tests
--echo #
--echo #
--echo # MDEV-9862 Illegal mix of collation, when comparing column with CASE expression
--echo #
SET NAMES cp850;
CREATE TABLE t1 (a CHAR(1) CHARACTER SET latin1);
SELECT a FROM t1 WHERE CASE a WHEN 'aaaa' THEN 'Y' WHEN 'aaaa' THEN 'Y' ELSE NULL END <> a;
DROP TABLE t1;
--echo #
--echo # End of 5.5 tests
--echo #
......@@ -2175,7 +2175,7 @@ public:
max_length= 0;
name= name_par ? name_par : (char*) "NULL";
fixed= 1;
collation.set(&my_charset_bin, DERIVATION_IGNORABLE);
collation.set(&my_charset_bin, DERIVATION_IGNORABLE, MY_REPERTOIRE_ASCII);
}
enum Type type() const { return NULL_ITEM; }
bool eq(const Item *item, bool binary_cmp) const;
......
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