diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-05-23 13:10:25 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-05-23 13:10:25 +0500 |
commit | ab8418a59f9cdae88747ade62e2eab3005aa29b4 (patch) | |
tree | 96a767e32ce6ec8ff92c231ff5d9fb1a819f69c5 /sql/field.h | |
parent | 493ba6ec9d3d9657eb5bb1ac7b22c9035aa47954 (diff) | |
download | mariadb-git-ab8418a59f9cdae88747ade62e2eab3005aa29b4.tar.gz |
SHOW FIELDS changes, more SQL99 INFORMATION_SCHEMA.COLUMNS compatibility:
Character set is not displayed in "Type" column anymore
In "Collation" column NULL instead of BINARY is now displayd for for non-character data types
mysql-test/r/alter_table.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/create.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/ctype_collate.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/ctype_recoding.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/gis.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/innodb.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/select.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/show_check.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/type_blob.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/type_float.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
mysql-test/r/type_ranges.result:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
sql/field.cc:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
sql/field.h:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
sql/sql_show.cc:
Character set is not displayed in "Type" column of SHOW FIELDS anymore
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index cf08b1a9717..7d4abbd1d41 100644 --- a/sql/field.h +++ b/sql/field.h @@ -211,6 +211,7 @@ public: virtual bool get_date(TIME *ltime,bool fuzzydate); virtual bool get_time(TIME *ltime); virtual CHARSET_INFO *charset(void) const { return &my_charset_bin; } + virtual bool has_charset(void) const { return FALSE; } virtual void set_charset(CHARSET_INFO *charset) { } virtual void set_warning(const unsigned int level, const unsigned int code); @@ -277,12 +278,10 @@ public: 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; } void make_field(Send_field *); 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; } friend class create_field; @@ -807,6 +806,7 @@ 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; } }; @@ -849,6 +849,7 @@ 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; } }; @@ -936,6 +937,8 @@ public: inline void clear_temporary() { bzero((char*) &value,sizeof(value)); } friend void field_conv(Field *to,Field *from); uint size_of() const { return sizeof(*this); } + bool has_charset(void) const + { return charset() == &my_charset_bin ? FALSE : TRUE; } }; @@ -1004,6 +1007,7 @@ public: virtual bool zero_pack() const { return 0; } bool optimize_range(uint idx) { return 0; } bool eq_def(Field *field); + bool has_charset(void) const { return TRUE; } }; @@ -1028,6 +1032,7 @@ public: String *val_str(String*,String *); void sql_type(String &str) const; enum_field_types real_type() const { return FIELD_TYPE_SET; } + bool has_charset(void) const { return TRUE; } }; |