From ef9c22611960eb3e7ebf1d0e4a53f47e3ef62480 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Dec 2002 14:36:05 +0400 Subject: [PATCH] BINARY_FLAG has been restored. It's needed by ODBC code. --- include/mysql_com.h | 1 + sql/field.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/mysql_com.h b/include/mysql_com.h index d5cd722a05a..58f4e224b89 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -57,6 +57,7 @@ enum enum_server_command #define BLOB_FLAG 16 /* Field is a blob */ #define UNSIGNED_FLAG 32 /* Field is unsigned */ #define ZEROFILL_FLAG 64 /* Field is zerofill */ +#define BINARY_FLAG 128 /* Field is binary */ /* The following are only sent to new clients */ #define ENUM_FLAG 256 /* field is an enum */ diff --git a/sql/field.h b/sql/field.h index ecb5fab121b..d0855aa46b3 100644 --- a/sql/field.h +++ b/sql/field.h @@ -132,7 +132,7 @@ public: tmp->key_start= tmp->part_of_key= tmp->part_of_sortkey= 0; tmp->unireg_check=Field::NONE; tmp->flags&= (NOT_NULL_FLAG | BLOB_FLAG | UNSIGNED_FLAG | - ZEROFILL_FLAG | ENUM_FLAG | SET_FLAG); + ZEROFILL_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG); tmp->table_name= new_table->table_name; tmp->reset_fields(); } @@ -260,7 +260,11 @@ public: struct st_table *table_arg,CHARSET_INFO *charset) :Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, table_arg) - { field_charset=charset; } + { + field_charset=charset; + if (binary()) + flags|=BINARY_FLAG; + } Item_result result_type () const { return STRING_RESULT; } void add_binary_or_charset(String &res) const; uint decimals() const { return NOT_FIXED_DEC; }