diff options
author | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-03-26 16:11:46 +0400 |
---|---|---|
committer | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-03-26 16:11:46 +0400 |
commit | 3eff43162ba3136ecd305534f1e9d7cc779ce301 (patch) | |
tree | c8c034c5ee2087b4b6a01f36456f4ca2bd8d20dc /sql/field.h | |
parent | c1e76fc06051f7f061f40d44e2b846ab04fdabfd (diff) | |
download | mariadb-git-3eff43162ba3136ecd305534f1e9d7cc779ce301.tar.gz |
1. New data types, from the user point of view:
BINARY(N) and VARBIBARY(N)
2. More 4.0 compatibility and more BINARY keyword consistency:
2a. CREATE TABLE a (a CHAR(N) BINARY)
is now synonym for
CREATE TABLE a (a CHAR(N) COLLATE xxxx_bin)
2b. SELECT BINARY x
is still synonin for
SELECT x COLLATE xxxxx_bin.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index 22d406b339a..e6ed5c2dbb7 100644 --- a/sql/field.h +++ b/sql/field.h @@ -864,7 +864,8 @@ public: uint max_packed_col_length(uint max_length); uint size_of() const { return sizeof(*this); } enum_field_types real_type() const { return FIELD_TYPE_STRING; } - bool has_charset(void) const { return TRUE; } + bool has_charset(void) const + { return charset() == &my_charset_bin ? FALSE : TRUE; } field_cast_enum field_cast_type() { return FIELD_CAST_STRING; } }; @@ -911,7 +912,8 @@ public: uint max_packed_col_length(uint max_length); uint size_of() const { return sizeof(*this); } enum_field_types real_type() const { return FIELD_TYPE_VAR_STRING; } - bool has_charset(void) const { return TRUE; } + bool has_charset(void) const + { return charset() == &my_charset_bin ? FALSE : TRUE; } field_cast_enum field_cast_type() { return FIELD_CAST_VARSTRING; } }; |