mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Fix for bug#56679: gis.test: valgrind error
Item_func_spatial_collection::fix_length_and_dec()
changed to use argument's print() method to print
the ER_ILLEGAL_VALUE_FOR_TYPE error.
mysql-test/r/gis.result:
Fix for bug#56679: gis.test: valgrind error
- test result adjusted.
sql/item_geofunc.h:
Fix for bug#56679: gis.test: valgrind error
- use argument's print() method instead of improper val_str()
call in the Item_func_spatial_collection::fix_length_and_dec(), as
it's applicable only for constant items.
This commit is contained in:
parent
0782e25aa2
commit
762c7ca462
2 changed files with 9 additions and 7 deletions
|
|
@ -177,13 +177,15 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
for( unsigned int i=0; i<arg_count; ++i)
|
||||
for (unsigned int i= 0; i < arg_count; ++i)
|
||||
{
|
||||
if( args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
|
||||
if (args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
|
||||
{
|
||||
String str;
|
||||
args[i]->val_str(&str);
|
||||
my_error(ER_ILLEGAL_VALUE_FOR_TYPE,MYF(0),"non geometric",str.c_ptr());
|
||||
args[i]->print(&str, QT_ORDINARY);
|
||||
str.append('\0');
|
||||
my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "non geometric",
|
||||
str.ptr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue