mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.2 into 10.3
This commit is contained in:
18
sql/field.h
18
sql/field.h
@ -1,7 +1,7 @@
|
||||
#ifndef FIELD_INCLUDED
|
||||
#define FIELD_INCLUDED
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2019, MariaDB Corporation.
|
||||
Copyright (c) 2008, 2020, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -825,6 +825,19 @@ public:
|
||||
DBUG_ASSERT(ls.length < UINT_MAX32);
|
||||
return store(ls.str, (uint) ls.length, cs);
|
||||
}
|
||||
|
||||
#ifdef HAVE_valgrind_or_MSAN
|
||||
/**
|
||||
Mark unused memory in the field as defined. Mainly used to ensure
|
||||
that if we write full field to disk (for example in
|
||||
Count_distinct_field::add(), we don't write unitalized data to
|
||||
disk which would confuse valgrind or MSAN.
|
||||
*/
|
||||
virtual void mark_unused_memory_as_defined() {}
|
||||
#else
|
||||
void mark_unused_memory_as_defined() {}
|
||||
#endif
|
||||
|
||||
virtual double val_real(void)=0;
|
||||
virtual longlong val_int(void)=0;
|
||||
/*
|
||||
@ -3451,6 +3464,9 @@ public:
|
||||
}
|
||||
int store(const char *to,size_t length,CHARSET_INFO *charset);
|
||||
using Field_str::store;
|
||||
#ifdef HAVE_valgrind_or_MSAN
|
||||
void mark_unused_memory_as_defined();
|
||||
#endif
|
||||
double val_real(void);
|
||||
longlong val_int(void);
|
||||
String *val_str(String*,String *);
|
||||
|
Reference in New Issue
Block a user