summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-05-18 17:30:02 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-05-18 17:30:02 +0300
commit23047d3ed42eacb5eaa5475a8fa4161550d01c52 (patch)
treee723067fea7cfb663ef7e4777e29ffd7dcd2905d /sql/field.cc
parentf86d97c3fee0127d83c009e448f419ac857c72c7 (diff)
parentfaf6d0ef3f9323c6d24f8cdb6533ed23d1a6bb40 (diff)
downloadmariadb-git-23047d3ed42eacb5eaa5475a8fa4161550d01c52.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 6234de43ec8..0f5caed57f6 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1455,7 +1455,7 @@ void Field::error_generated_column_function_is_not_allowed(THD *thd,
QT_ITEM_IDENT_SKIP_TABLE_NAMES));
my_error(ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED,
MYF(error ? 0 : ME_WARNING),
- tmp.c_ptr(), vcol_info->get_vcol_type_name(),
+ tmp.c_ptr_safe(), vcol_info->get_vcol_type_name(),
const_cast<const char*>(field_name.str));
}
@@ -7680,6 +7680,15 @@ my_decimal *Field_varstring::val_decimal(my_decimal *decimal_value)
}
+#ifdef HAVE_valgrind_or_MSAN
+void Field_varstring::mark_unused_memory_as_defined()
+{
+ uint used_length= get_length();
+ MEM_MAKE_DEFINED(get_data() + used_length, field_length - used_length);
+}
+#endif
+
+
int Field_varstring::cmp_max(const uchar *a_ptr, const uchar *b_ptr,
uint max_len) const
{