Commit 70356012 authored by unknown's avatar unknown

Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0

into gw.mysql.r18.ru:/usr/home/ram/work/5.0

parents 4db9aaee 8c3a1fde
...@@ -123,6 +123,7 @@ class Field ...@@ -123,6 +123,7 @@ class Field
} }
virtual bool eq_def(Field *field); virtual bool eq_def(Field *field);
virtual uint32 pack_length() const { return (uint32) field_length; } virtual uint32 pack_length() const { return (uint32) field_length; }
virtual uint32 pack_length_in_rec() const { return pack_length(); }
virtual void reset(void) { bzero(ptr,pack_length()); } virtual void reset(void) { bzero(ptr,pack_length()); }
virtual void reset_fields() {} virtual void reset_fields() {}
virtual void set_default() virtual void set_default()
...@@ -1237,6 +1238,7 @@ class Field_bit :public Field { ...@@ -1237,6 +1238,7 @@ class Field_bit :public Field {
{ get_key_image(buff, length, itRAW); } { get_key_image(buff, length, itRAW); }
uint32 pack_length() const uint32 pack_length() const
{ return (uint32) field_length + (bit_len > 0); } { return (uint32) field_length + (bit_len > 0); }
uint32 pack_length_in_rec() const { return field_length; }
void sql_type(String &str) const; void sql_type(String &str) const;
field_cast_enum field_cast_type() { return FIELD_CAST_BIT; } field_cast_enum field_cast_type() { return FIELD_CAST_BIT; }
char *pack(char *to, const char *from, uint max_length=~(uint) 0); char *pack(char *to, const char *from, uint max_length=~(uint) 0);
......
...@@ -1467,7 +1467,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg, ...@@ -1467,7 +1467,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
fieldpos <= minpos) fieldpos <= minpos)
{ {
/* skip null fields */ /* skip null fields */
if (!(temp_length= (*field)->pack_length())) if (!(temp_length= (*field)->pack_length_in_rec()))
continue; /* Skip null-fields */ continue; /* Skip null-fields */
if (! found || fieldpos < minpos || if (! found || fieldpos < minpos ||
(fieldpos == minpos && temp_length < length)) (fieldpos == minpos && temp_length < length))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment