Commit 8cf7979e authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

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

into neptunus.(none):/home/msvensson/mysql/mysql-5.0
parents a1c4918a eae4d9c0
...@@ -7879,7 +7879,7 @@ int Field_bit::key_cmp(const byte *str, uint length) ...@@ -7879,7 +7879,7 @@ int Field_bit::key_cmp(const byte *str, uint length)
str++; str++;
length--; length--;
} }
return bcmp(ptr, str, length); return memcmp(ptr, str, length);
} }
...@@ -7893,7 +7893,7 @@ int Field_bit::cmp_offset(uint row_offset) ...@@ -7893,7 +7893,7 @@ int Field_bit::cmp_offset(uint row_offset)
if ((flag= (int) (bits_a - bits_b))) if ((flag= (int) (bits_a - bits_b)))
return flag; return flag;
} }
return bcmp(ptr, ptr + row_offset, field_length); return memcmp(ptr, ptr + row_offset, field_length);
} }
......
...@@ -563,7 +563,9 @@ int prepare_create_field(create_field *sql_field, ...@@ -563,7 +563,9 @@ int prepare_create_field(create_field *sql_field,
sql_field->pack_flag=f_settype((uint) sql_field->sql_type); sql_field->pack_flag=f_settype((uint) sql_field->sql_type);
break; break;
case FIELD_TYPE_BIT: case FIELD_TYPE_BIT:
sql_field->pack_flag|= FIELDFLAG_NUMBER; sql_field->pack_flag= f_bit_as_char(sql_field->pack_flag) ?
FIELDFLAG_NUMBER | FIELDFLAG_TREAT_BIT_AS_CHAR :
FIELDFLAG_NUMBER;
break; break;
case FIELD_TYPE_NEWDECIMAL: case FIELD_TYPE_NEWDECIMAL:
sql_field->pack_flag=(FIELDFLAG_NUMBER | sql_field->pack_flag=(FIELDFLAG_NUMBER |
......
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