diff options
author | hf@deer.(none) <> | 2004-03-23 17:57:14 +0400 |
---|---|---|
committer | hf@deer.(none) <> | 2004-03-23 17:57:14 +0400 |
commit | 7ab1c2106db4653268404775d54ea55b912d3b6b (patch) | |
tree | 9d21220431fe6e44974cb0d6254ce2dbbe7afebb /sql | |
parent | a90f34ab6b2963a4d6500648a5c6f8a910060f91 (diff) | |
download | mariadb-git-7ab1c2106db4653268404775d54ea55b912d3b6b.tar.gz |
Fix for #3266 (garbled TEXT fields as a result of CREATE TABLE SELECT)
Problem is that Item::save_in_field modifies str_value member
before it calls val_str but Item_copy_string::val_str just returns
this str_value as the result.
I added local String variable to the Item::save_in_field
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc index 7549bac71b8..59f3bc7077e 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1282,8 +1282,8 @@ int Item::save_in_field(Field *field, bool no_conversions) String *result; CHARSET_INFO *cs= collation.collation; char buff[MAX_FIELD_WIDTH]; // Alloc buffer for small columns - str_value.set_quick(buff,sizeof(buff),cs); - result=val_str(&str_value); + String loc_value(buff, sizeof(buff), cs); + result=val_str(&loc_value); if (null_value) return set_field_to_null_with_conversions(field, no_conversions); field->set_notnull(); |