in field_conv() don't simply check to->type() == MYSQL_TYPE_BLOB, this
misses GEOMETRY columns.
This commit is contained in:
parent
e1c76b80d9
commit
05c0103ad8
@ -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)
|
|||||||
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,
|
|||||||
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user