diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-05-20 23:56:13 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-05-20 23:56:13 +0200 |
commit | 7c459960ece917dcdc4dedc9f3dd0c9f5d07c3b8 (patch) | |
tree | 7aa6c0cd967e881fe4516ce22b133d595d8c4f11 /sql/field_conv.cc | |
parent | 8767540a43b28c977714e2f35aadcfd1bcefef5f (diff) | |
download | mariadb-git-7c459960ece917dcdc4dedc9f3dd0c9f5d07c3b8.tar.gz |
db_low_byte_first is gone
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index e4da3f114ef..2d08cd0694b 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -644,13 +644,11 @@ void Copy_field::set(Field *to,Field *from,bool save) Copy_field::Copy_func * Copy_field::get_copy_func(Field *to,Field *from) { - bool compatible_db_low_byte_first= (to->table->s->db_low_byte_first == - from->table->s->db_low_byte_first); if (to->flags & BLOB_FLAG) { if (!(from->flags & BLOB_FLAG) || from->charset() != to->charset()) return do_conv_blob; - if (from_length != to_length || !compatible_db_low_byte_first) + if (from_length != to_length) { // Correct pointer to point at char pointer to_ptr+= to_length - to->table->s->blob_ptr_size; @@ -684,7 +682,6 @@ Copy_field::get_copy_func(Field *to,Field *from) if we don't allow 'all' dates. */ if (to->real_type() != from->real_type() || - !compatible_db_low_byte_first || (((to->table->in_use->variables.sql_mode & (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) && to->type() == MYSQL_TYPE_DATE) || @@ -735,8 +732,7 @@ Copy_field::get_copy_func(Field *to,Field *from) } else if (to->real_type() != from->real_type() || - to_length != from_length || - !compatible_db_low_byte_first) + to_length != from_length) { if (to->real_type() == MYSQL_TYPE_DECIMAL || to->result_type() == STRING_RESULT) @@ -747,7 +743,7 @@ Copy_field::get_copy_func(Field *to,Field *from) } else { - if (!to->eq_def(from) || !compatible_db_low_byte_first) + if (!to->eq_def(from)) { if (to->real_type() == MYSQL_TYPE_DECIMAL) return do_field_string; @@ -780,14 +776,13 @@ int field_conv(Field *to,Field *from) { if (to->pack_length() == from->pack_length() && !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && + to->decimals() == from->decimals() && to->real_type() != MYSQL_TYPE_ENUM && to->real_type() != MYSQL_TYPE_SET && to->real_type() != MYSQL_TYPE_BIT && (to->real_type() != MYSQL_TYPE_NEWDECIMAL || - (to->field_length == from->field_length && - (((Field_num*)to)->dec == ((Field_num*)from)->dec))) && + to->field_length == from->field_length) && from->charset() == to->charset() && - to->table->s->db_low_byte_first == from->table->s->db_low_byte_first && (!(to->table->in_use->variables.sql_mode & (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) || (to->type() != MYSQL_TYPE_DATE && |