summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-03-07 19:52:00 +0400
committerAlexander Barkov <bar@mariadb.com>2019-02-23 17:43:59 +0400
commit8036ad541e9da4073a6136052e41c22c758b770e (patch)
treeda5b808faf07b27226e2dcd40927a75923c9693e /sql/field.h
parent0ef8848526c117ed8731e42edbb3f28652b168f2 (diff)
downloadmariadb-git-8036ad541e9da4073a6136052e41c22c758b770e.tar.gz
Backporting MDEV-15497 Wrong empty value in a GEOMETRY column on LOAD DATA
This is a part of "MDEV-18045 Backporting the MDEV-15497 changes to 10.2 branch"
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 728b1f68880..c10262a68d0 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1145,6 +1145,9 @@ public:
{ return null_ptr != 0 || table->maybe_null; }
// Set to NULL on LOAD DATA or LOAD XML
virtual bool load_data_set_null(THD *thd);
+ // Reset when a LOAD DATA file ended unexpectedly
+ virtual bool load_data_set_no_data(THD *thd, bool fixed_format);
+ void load_data_set_value(const char *pos, uint length, CHARSET_INFO *cs);
/* @return true if this field is NULL-able (even if temporarily) */
inline bool real_maybe_null(void) const { return null_ptr != 0; }
@@ -2485,6 +2488,7 @@ public:
return get_equal_const_item_datetime(thd, ctx, const_item);
}
bool load_data_set_null(THD *thd);
+ bool load_data_set_no_data(THD *thd, bool fixed_format);
uint size_of() const { return sizeof(*this); }
};
@@ -3506,6 +3510,7 @@ public:
*/
int reset(void) { return Field_blob::reset() || !maybe_null(); }
bool load_data_set_null(THD *thd);
+ bool load_data_set_no_data(THD *thd, bool fixed_format);
geometry_type get_geometry_type() { return geom_type; };
static geometry_type geometry_type_merge(geometry_type, geometry_type);