From 2496e85b84aad64a273dcb6ee45bb4a706c4b87d Mon Sep 17 00:00:00 2001 From: "bar@mysql.com" <> Date: Thu, 19 Aug 2004 15:15:10 +0500 Subject: Bug#4521: unique key prefix interacts poorly with utf8. Fix for binary collations for MyISAM and HEAP BTREE. This patch also changes trailing spaces behaviour for binary collations. Binary collations now have PAD characteristic too. --- sql/field.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index fe06cd96f1a..83c5a71f07f 100644 --- a/sql/field.h +++ b/sql/field.h @@ -357,7 +357,7 @@ public: uint size_of() const { return sizeof(*this); } CHARSET_INFO *charset(void) const { return field_charset; } void set_charset(CHARSET_INFO *charset) { field_charset=charset; } - bool binary() const { return field_charset->state & MY_CS_BINSORT ? 1 : 0; } + bool binary() const { return field_charset == &my_charset_bin; } uint32 max_length() { return field_length; } friend class create_field; }; -- cgit v1.2.1