Commit 05c0103a authored by Sergei Golubchik's avatar Sergei Golubchik

in field_conv() don't simply check to->type() == MYSQL_TYPE_BLOB, this

misses GEOMETRY columns.
parent e1c76b80
...@@ -829,7 +829,7 @@ Copy_field::get_copy_func(Field *to,Field *from) ...@@ -829,7 +829,7 @@ Copy_field::get_copy_func(Field *to,Field *from)
int field_conv(Field *to,Field *from) int field_conv(Field *to,Field *from)
{ {
if (to->real_type() == from->real_type() && 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() && if (to->pack_length() == from->pack_length() &&
!(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) &&
...@@ -858,7 +858,7 @@ int field_conv(Field *to,Field *from) ...@@ -858,7 +858,7 @@ int field_conv(Field *to,Field *from)
return 0; return 0;
} }
} }
if (to->type() == MYSQL_TYPE_BLOB) if (to->flags & BLOB_FLAG)
{ // Be sure the value is stored { // Be sure the value is stored
Field_blob *blob=(Field_blob*) to; Field_blob *blob=(Field_blob*) to;
from->val_str(&blob->value); from->val_str(&blob->value);
......
...@@ -2847,7 +2847,7 @@ int prepare_create_field(Create_field *sql_field, ...@@ -2847,7 +2847,7 @@ int prepare_create_field(Create_field *sql_field,
longlong table_flags) longlong table_flags)
{ {
unsigned int dup_val_count; unsigned int dup_val_count;
DBUG_ENTER("prepare_field"); DBUG_ENTER("prepare_create_field");
/* /*
This code came from mysql_prepare_create_table. This code came from mysql_prepare_create_table.
......
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