Commit 26d0c4b1 authored by unknown's avatar unknown

Fix for #233 (final part)


mysql-test/r/gis.result:
  test result added
mysql-test/t/gis.test:
  test case added
sql/field.h:
  now set_field_to_null can return -1
sql/field_conv.cc:
  now set_field_to_null* can return -1
parent f5b1078b
......@@ -458,3 +458,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select high_priority issimple(multipoint(point(3,6),point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,issimple(point(3,6)) AS `issimple(Point(3, 6))`
create table t1 (a geometry not null);
insert into t1 values (GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
ERROR HY000: Unknown error
alter table t1 add spatial index(a);
drop table t1;
......@@ -160,3 +160,11 @@ SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
explain extended SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
#select issimple(MultiPoint(Point(3, 6), Point(4, 10))), issimple(Point(3, 6)),issimple(PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),issimple(GeometryFromText('POINT(1 4)')), issimple(AsWKB(GeometryFromText('POINT(1 4)')));
explain extended select issimple(MultiPoint(Point(3, 6), Point(4, 10))), issimple(Point(3, 6));
create table t1 (a geometry not null);
insert into t1 values (GeomFromText('Point(1 2)'));
-- error 1105
insert into t1 values ('Garbage');
alter table t1 add spatial index(a);
drop table t1;
......@@ -1184,8 +1184,8 @@ Field *make_field(char *ptr, uint32 field_length,
struct st_table *table);
uint pack_length_to_packflag(uint type);
uint32 calc_pack_length(enum_field_types type,uint32 length);
bool set_field_to_null(Field *field);
bool set_field_to_null_with_conversions(Field *field, bool no_conversions);
int set_field_to_null(Field *field);
int set_field_to_null_with_conversions(Field *field, bool no_conversions);
bool test_if_int(const char *str, int length, const char *int_end,
CHARSET_INFO *cs);
......
......@@ -109,7 +109,7 @@ static void do_outer_field_to_null_str(Copy_field *copy)
}
bool
int
set_field_to_null(Field *field)
{
if (field->real_maybe_null())
......@@ -149,7 +149,7 @@ set_field_to_null(Field *field)
If no_conversion was not set, an error message is printed
*/
bool
int
set_field_to_null_with_conversions(Field *field, bool no_conversions)
{
if (field->real_maybe_null())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment