MDEV-9862 Illegal mix of collation, when comparing column with CASE expression
This commit is contained in:
parent
11b77e9b18
commit
777c2131dd
14
mysql-test/r/ctype_cp850.result
Normal file
14
mysql-test/r/ctype_cp850.result
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# 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
|
||||||
|
#
|
16
mysql-test/t/ctype_cp850.test
Normal file
16
mysql-test/t/ctype_cp850.test
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--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;
|
max_length= 0;
|
||||||
name= name_par ? name_par : (char*) "NULL";
|
name= name_par ? name_par : (char*) "NULL";
|
||||||
fixed= 1;
|
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; }
|
enum Type type() const { return NULL_ITEM; }
|
||||||
bool eq(const Item *item, bool binary_cmp) const;
|
bool eq(const Item *item, bool binary_cmp) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user