diff options
author | unknown <hf@deer.(none)> | 2004-10-22 20:32:02 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-10-22 20:32:02 +0500 |
commit | 7e38104cb4685227044daa6ef3f34028456f1c9c (patch) | |
tree | 1bd495ce807d46d5040d6f93c81d63b24e0e3f57 /sql/item_geofunc.cc | |
parent | ac8c655bd8cf77ff4ec5e062d0dda2878710dde7 (diff) | |
download | mariadb-git-7e38104cb4685227044daa6ef3f34028456f1c9c.tar.gz |
Fix for bug #6117 (Centroid() crashes server)
I learned that one shouldn't use String::set in val_str() methods...
mysql-test/r/gis.result:
Test result for #6117
mysql-test/t/gis.test:
Test case #6117
sql/item_geofunc.cc:
String::set doesn't work here
sql/spatial.cc:
Error message isn't needed here
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 935925c1e83..7c3319bbfea 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -148,9 +148,9 @@ String *Item_func_geometry_type::val_str(String *str) swkb->length() - SRID_SIZE))))) return 0; /* String will not move */ - str->set(geom->get_class_info()->m_name.str, - geom->get_class_info()->m_name.length, - default_charset()); + str->copy(geom->get_class_info()->m_name.str, + geom->get_class_info()->m_name.length, + default_charset()); return str; } |