diff options
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index 728eb6f3f49..8e7e5a6d854 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,6 +1,6 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. +/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. Copyright (c) 2009-2011 Monty Program Ab This program is free software; you can redistribute it and/or modify @@ -1943,7 +1943,13 @@ public: int store(longlong nr, bool unsigned_val); int store_decimal(const my_decimal *); uint size_of() const { return sizeof(*this); } - int reset(void) { return !maybe_null() || Field_blob::reset(); } + + /** + Non-nullable GEOMETRY types cannot have defaults, + but the underlying blob must still be reset. + */ + int reset(void) { return Field_blob::reset() || !maybe_null(); } + geometry_type get_geometry_type() { return geom_type; }; }; #endif /*HAVE_SPATIAL*/ |