diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-15 21:17:08 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-15 21:17:08 +0200 |
commit | 05c0103ad83480134429c55f477ea85df1f7b17f (patch) | |
tree | 23da11925254a6e66f8d9b569f570ccce92fc39b | |
parent | e1c76b80d91c43a9f17d9ec4c96e4dcb72efb1a2 (diff) | |
download | mariadb-git-05c0103ad83480134429c55f477ea85df1f7b17f.tar.gz |
in field_conv() don't simply check to->type() == MYSQL_TYPE_BLOB, this
misses GEOMETRY columns.
-rw-r--r-- | sql/field_conv.cc | 4 | ||||
-rw-r--r-- | sql/sql_table.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index c4cc8d53ae4..37b0308eb1b 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -829,7 +829,7 @@ Copy_field::get_copy_func(Field *to,Field *from) int field_conv(Field *to,Field *from) { if (to->real_type() == from->real_type() && - !(to->type() == MYSQL_TYPE_BLOB && to->table->copy_blobs)) + !(to->flags & BLOB_FLAG && to->table->copy_blobs)) { if (to->pack_length() == from->pack_length() && !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && @@ -858,7 +858,7 @@ int field_conv(Field *to,Field *from) return 0; } } - if (to->type() == MYSQL_TYPE_BLOB) + if (to->flags & BLOB_FLAG) { // Be sure the value is stored Field_blob *blob=(Field_blob*) to; from->val_str(&blob->value); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f0ad42fe6b2..9a0fba6e9d7 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2847,7 +2847,7 @@ int prepare_create_field(Create_field *sql_field, longlong table_flags) { unsigned int dup_val_count; - DBUG_ENTER("prepare_field"); + DBUG_ENTER("prepare_create_field"); /* This code came from mysql_prepare_create_table. |