mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
This commit is contained in:
parent
ac8c655bd8
commit
7e38104cb4
4 changed files with 153 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue