Commit b08c4201 authored by Alexander Barkov's avatar Alexander Barkov

Removing unused String declaration in Create_field::Create_field

parent e4f8cea3
......@@ -10076,18 +10076,14 @@ Create_field::Create_field(Field *old_field,Field *orig_field)
}
if (!default_now) // Give a constant default
{
char buff[MAX_FIELD_WIDTH];
String tmp(buff,sizeof(buff), charset);
/* Get the value from default_values */
my_ptrdiff_t diff= orig_field->table->default_values_offset();
orig_field->move_field_offset(diff); // Points now at default_values
if (!orig_field->is_real_null())
{
char buff[MAX_FIELD_WIDTH], *pos;
String tmp(buff, sizeof(buff), charset), *res;
res= orig_field->val_str(&tmp);
pos= (char*) sql_strmake(res->ptr(), res->length());
StringBuffer<MAX_FIELD_WIDTH> tmp(charset);
String *res= orig_field->val_str(&tmp);
char *pos= (char*) sql_strmake(res->ptr(), res->length());
def= new Item_string(pos, res->length(), charset);
}
orig_field->move_field_offset(-diff); // Back to record[0]
......
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