diff options
author | Kristofer Pettersson <kristofer.pettersson@oracle.com> | 2010-09-08 09:36:39 +0200 |
---|---|---|
committer | Kristofer Pettersson <kristofer.pettersson@oracle.com> | 2010-09-08 09:36:39 +0200 |
commit | ccc7ae0e17bdb074a9a124ea08609fb88f5879ad (patch) | |
tree | cd611056334ece0c5292987083c3494df3ad5e56 /sql | |
parent | 1f84bb0c0fc4682b36d56b4f33fbdfb1c8e13dfa (diff) | |
parent | dc285eb7cd1e22fe8f6feac065b03602a6d804c3 (diff) | |
download | mariadb-git-ccc7ae0e17bdb074a9a124ea08609fb88f5879ad.tar.gz |
merge 5.1-security => 5.5-security
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 2 | ||||
-rw-r--r-- | sql/item_geofunc.h | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc index 599e8349bca..53141ca0b4a 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4516,7 +4516,7 @@ String *Field_double::val_str(String *val_buffer, #endif doubleget(nr,ptr); - uint to_length=max(field_length, DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE); + uint to_length= DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE; val_buffer->alloc(to_length); char *to=(char*) val_buffer->ptr(); size_t len; diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 25755de1e2c..9360013fa80 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -179,6 +179,19 @@ public: item_type=it; } String *val_str(String *); + void fix_length_and_dec() + { + for( unsigned int i=0; i<arg_count; ++i) + { + 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()); + } + } + } + const char *func_name() const { return "multipoint"; } }; |