diff options
author | ramil@mysql.com <> | 2005-06-30 13:38:29 +0500 |
---|---|---|
committer | ramil@mysql.com <> | 2005-06-30 13:38:29 +0500 |
commit | 2eea2f52089028e97ab1c3b9e33e68fd8eadb094 (patch) | |
tree | f53e41c733126b913f5ed16800c045995ae753fd /sql/field.h | |
parent | 0d894f3d3b834c17f1cba7f4b7719e6ba0fb2ba0 (diff) | |
download | mariadb-git-2eea2f52089028e97ab1c3b9e33e68fd8eadb094.tar.gz |
a fix.
bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h index ebf48568c04..2b1229744c2 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1288,7 +1288,7 @@ public: enum_field_types type() const { return FIELD_TYPE_BIT; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_BIT; } uint32 key_length() const { return (uint32) field_length + (bit_len > 0); } - uint32 max_length() { return (uint32) field_length + (bit_len > 0); } + uint32 max_length() { return (uint32) field_length * 8 + bit_len; } uint size_of() const { return sizeof(*this); } Item_result result_type () const { return INT_RESULT; } void reset(void) { bzero(ptr, field_length); } @@ -1320,6 +1320,11 @@ public: Field *new_key_field(MEM_ROOT *root, struct st_table *new_table, char *new_ptr, uchar *new_null_ptr, uint new_null_bit); + void set_bit_ptr(uchar *bit_ptr_arg, uchar bit_ofs_arg) + { + bit_ptr= bit_ptr_arg; + bit_ofs= bit_ofs_arg; + } }; @@ -1331,6 +1336,7 @@ public: enum utype unireg_check_arg, const char *field_name_arg, struct st_table *table_arg); enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; } + uint32 max_length() { return (uint32) create_length; } uint size_of() const { return sizeof(*this); } int store(const char *to, uint length, CHARSET_INFO *charset); int store(double nr) { return Field_bit::store(nr); } |