SSL field.h
Sprache: C
|
|
#ifndef FIELD_INCLUDED
#define FIELD_INCLUDED
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2008, 2021, 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
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
/*
Because of the function make_new_field() all field classes that have static
variables must declare the size_of() member function.
*/
#include "mysqld.h" /* system_charset_info */
#include "table.h" /* TABLE */
#include "sql_string.h" /* String */
#include "my_decimal.h" /* my_decimal */
#include "sql_error.h" /* Sql_condition */
#include "compat56.h"
#include "sql_type.h" /* Type_std_attributes */
#include "field_comp.h"
class Send_field;
class Copy_field;
class Protocol;
class Protocol_text;
class Create_field;
class Relay_log_info;
class Field;
class Column_statistics;
class Column_statistics_collected;
class Item_func;
class Item_bool_func;
class Item_equal;
class Virtual_tmp_table;
class Qualified_column_ident;
class Qualified_ident;
class Table_ident;
class SEL_ARG;
class RANGE_OPT_PARAM;
struct KEY_PART;
struct SORT_FIELD;
struct SORT_FIELD_ATTR;
enum enum_check_fields
{
CHECK_FIELD_IGNORE,
CHECK_FIELD_EXPRESSION,
CHECK_FIELD_WARN,
CHECK_FIELD_ERROR_FOR_NULL,
};
enum ignore_value_reaction
{
IGNORE_MEANS_ERROR,
IGNORE_MEANS_DEFAULT,
IGNORE_MEANS_FIELD_VALUE
};
ignore_value_reaction find_ignore_reaction(THD *thd);
enum enum_conv_type
{
CONV_TYPE_PRECISE,
CONV_TYPE_VARIANT,
CONV_TYPE_SUBSET_TO_SUPERSET,
CONV_TYPE_SUPERSET_TO_SUBSET,
CONV_TYPE_IMPOSSIBLE
};
/* Old 32 bit timestamp */
extern const uchar timestamp_old_bytes[7];
class Conv_param
{
uint16 m_table_def_flags;
public:
Conv_param(uint16 table_def_flags)
:m_table_def_flags(table_def_flags)
{ }
uint16 table_def_flags() const { return m_table_def_flags; }
};
class Conv_source: public Type_handler_hybrid_field_type
{
uint16 m_metadata;
CHARSET_INFO *m_cs;
public:
Conv_source(const Type_handler *h, uint16 metadata, CHARSET_INFO *cs)
:Type_handler_hybrid_field_type(h),
m_metadata(metadata),
m_cs(cs)
{
DBUG_ASSERT(cs);
}
uint16 metadata() const { return m_metadata; }
uint mbmaxlen() const { return m_cs->mbmaxlen; }
};
/*
Common declarations for Field and Item
*/
class Value_source
{
protected:
// Parameters for warning and note generation
class Warn_filter
{
bool m_want_warning_edom;
bool m_want_note_truncated_spaces;
public:
Warn_filter(bool want_warning_edom, bool want_note_truncated_spaces) :
m_want_warning_edom(want_warning_edom),
m_want_note_truncated_spaces(want_note_truncated_spaces)
{ }
Warn_filter(const THD *thd);
bool want_warning_edom() const
{ return m_want_warning_edom; }
bool want_note_truncated_spaces() const
{ return m_want_note_truncated_spaces; }
};
class Warn_filter_all: public Warn_filter
{
public:
Warn_filter_all() :Warn_filter(true, true) { }
};
class Converter_double_to_longlong
{
protected:
bool m_error;
longlong m_result;
public:
Converter_double_to_longlong(double nr, bool unsigned_flag);
longlong result() const { return m_result; }
bool error() const { return m_error; }
void push_warning(THD *thd, double nr, bool unsigned_flag);
};
class Converter_double_to_longlong_with_warn:
public Converter_double_to_longlong
{
public:
Converter_double_to_longlong_with_warn(THD *thd, double nr,
bool unsigned_flag)
:Converter_double_to_longlong(nr, unsigned_flag)
{
if (m_error)
push_warning(thd, nr, unsigned_flag);
}
Converter_double_to_longlong_with_warn(double nr, bool unsigned_flag)
:Converter_double_to_longlong(nr, unsigned_flag)
{
if (m_error)
push_warning(current_thd, nr, unsigned_flag);
}
};
// String-to-number converters
class Converter_string_to_number
{
protected:
char *m_end_of_num; // Where the low-level conversion routine stopped
int m_error; // The error code returned by the low-level routine
bool m_edom; // If EDOM-alike error happened during conversion
/**
Check string-to-number conversion and produce a warning if
- could not convert any digits (EDOM-alike error)
- found garbage at the end of the string
- found extra spaces at the end (a note)
See also Field_num::check_edom_and_truncation() for a similar function.
@param thd - the thread that will be used to generate warnings.
Can be NULL (which means current_thd will be used
if a warning is really necessary).
@param type - name of the data type
(e.g. "INTEGER", "DECIMAL", "DOUBLE")
@param cs - character set of the original string
@param str - the original string
@param end - the end of the string
@param allow_notes - tells if trailing space notes should be displayed
or suppressed.
Unlike Field_num::check_edom_and_truncation(), this function does not
distinguish between EDOM and truncation and reports the same warning for
both cases. Perhaps we should eventually print different warnings,
to make the explicit CAST work closer to the implicit cast in
Field_xxx::store().
*/
void check_edom_and_truncation(THD *thd, Warn_filter filter,
const char *type,
CHARSET_INFO *cs,
const char *str,
size_t length) const;
public:
int error() const { return m_error; }
};
class Converter_strntod: public Converter_string_to_number
{
double m_result;
public:
Converter_strntod(CHARSET_INFO *cs, const char *str, size_t length)
{
m_result= cs->strntod((char *) str, length, &m_end_of_num, &m_error);
// strntod() does not set an error if the input string was empty
m_edom= m_error !=0 || str == m_end_of_num;
}
double result() const { return m_result; }
};
class Converter_string_to_longlong: public Converter_string_to_number
{
protected:
longlong m_result;
public:
longlong result() const { return m_result; }
};
class Converter_strntoll: public Converter_string_to_longlong
{
public:
Converter_strntoll(CHARSET_INFO *cs, const char *str, size_t length)
{
m_result= cs->strntoll(str, length, 10, &m_end_of_num, &m_error);
/*
All non-zero errors means EDOM error.
strntoll() does not set an error if the input string was empty.
Check it here.
Notice the different with the same condition in Converter_strntoll10.
*/
m_edom= m_error != 0 || str == m_end_of_num;
}
};
class Converter_strtoll10: public Converter_string_to_longlong
{
public:
Converter_strtoll10(CHARSET_INFO *cs, const char *str, size_t length)
{
m_end_of_num= (char *) str + length;
m_result= cs->strtoll10(str, &m_end_of_num, &m_error);
/*
Negative error means "good negative number".
Only a positive m_error value means a real error.
strtoll10() sets error to MY_ERRNO_EDOM in case of an empty string,
so we don't have to additionally catch empty strings here.
*/
m_edom= m_error > 0;
}
};
class Converter_str2my_decimal: public Converter_string_to_number
{
public:
Converter_str2my_decimal(uint mask,
CHARSET_INFO *cs, const char *str, size_t length,
my_decimal *buf)
{
DBUG_ASSERT(length < UINT_MAX32);
m_error= str2my_decimal(mask, str, length, cs,
buf, (const char **) &m_end_of_num);
// E_DEC_TRUNCATED means a very minor truncation: '1e-100' -> 0
m_edom= m_error && m_error != E_DEC_TRUNCATED;
}
};
// String-to-number converters with automatic warning generation
class Converter_strntod_with_warn: public Converter_strntod
{
const char *m_data_type;
public:
Converter_strntod_with_warn(THD *thd, Warn_filter filter,
const char *data_type,
CHARSET_INFO *cs,
const char *str, size_t length)
:Converter_strntod(cs, str, length),
m_data_type(data_type)
{
check_edom_and_truncation(thd, filter, m_data_type, cs, str, length);
}
};
class Converter_strntoll_with_warn: public Converter_strntoll
{
public:
Converter_strntoll_with_warn(THD *thd, Warn_filter filter,
CHARSET_INFO *cs,
const char *str, size_t length)
:Converter_strntoll(cs, str, length)
{
check_edom_and_truncation(thd, filter, "INTEGER", cs, str, length);
}
};
class Converter_strtoll10_with_warn: public Converter_strtoll10
{
public:
Converter_strtoll10_with_warn(THD *thd, Warn_filter filter,
CHARSET_INFO *cs,
const char *str, size_t length)
:Converter_strtoll10(cs, str, length)
{
check_edom_and_truncation(thd, filter, "INTEGER", cs, str, length);
}
};
class Converter_str2my_decimal_with_warn: public Converter_str2my_decimal
{
public:
Converter_str2my_decimal_with_warn(THD *thd, Warn_filter filter,
uint mask, CHARSET_INFO *cs,
const char *str, size_t length,
my_decimal *buf)
:Converter_str2my_decimal(mask, cs, str, length, buf)
{
check_edom_and_truncation(thd, filter, "DECIMAL", cs, str, length);
}
};
// String-to-number conversion methods for the old code compatibility
longlong longlong_from_string_with_check(CHARSET_INFO *cs, const char *cptr,
const char *end) const
{
/*
TODO: Give error if we wanted a signed integer and we got an unsigned
one
Notice, longlong_from_string_with_check() honors thd->no_error, because
it's used to handle queries like this:
SELECT COUNT(@@basedir);
and is called when Item_func_get_system_var::update_null_value()
suppresses warnings and then calls val_int().
The other methods {double|decimal}_from_string_with_check() ignore
thd->no_errors, because they are not used for update_null_value()
and they always allow all kind of warnings.
*/
THD *thd= current_thd;
return Converter_strtoll10_with_warn(thd, Warn_filter(thd),
cs, cptr, end - cptr).result();
}
double double_from_string_with_check(CHARSET_INFO *cs, const char *cptr,
const char *end) const
{
return Converter_strntod_with_warn(NULL, Warn_filter_all(), "DOUBLE",
cs, cptr, end - cptr).result();
}
my_decimal *decimal_from_string_with_check(my_decimal
*java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
nst*,
const char *end)
{
Converter_str2my_decimal_with_warn(NULL, Warn_filter_all(),
E_DEC_FATAL_ERROR & ~E_DEC_BAD_NUMthe Free SoftwareFoundation;version 2of the License.
cs, cptr
return decimal_value;
}
longlong longlong_from_hex_hybrid(const char *str, size_t length)
{
const char *end= str + length;
const char *ptr= end - MY_MIN(length, sizeof(longlong));
ulonglong value= 0;
for ( ; ptr != end ; ptr++)
value= (value << 8) + (ulonglong) (uchar) *ptr;
return (longlong) value;
}
longlong longlong_from_string_with_check but ANY WARRANTY withouteventhe impliedwarrantyof
{
return longlong_from_string_with_check(str->charset(),
str->ptr()MERCHANTABILITY orFITNESSFORAPARTICULARPURPOSE Seethe
}
double double_from_string_with_check(const String *str) const
{
return double_from_string_with_check(str->charset(),
str->ptr(), str->end());
}
my_decimal *decimal_from_string_with_check(my_decimal *decimal_value,
const String *str)
{
return decimal_from_string_with_check(decimal_value, str->charset(),
str->ptr(), str->end());
}
// End of String-to-number conversion methods
public:
/*
The enumeration Subst_constraint is currently used only in implementations
of the virtual function subst_argument_checker.
*/
enum Subst_constraint
{ ou shouldhave receivedacopy oftheGNU General PublicLicense
ANY_SUBST, /* Any substitution for a field is allowed */
IDENTITY_SUBST /* Substitution for a field is allowed if any two
different values of the field type are not equal */
};
/*
Item context attributes.
Comparison functions pass their attributes to Foundation, Inc., 51 Franklin java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
For example, for string #nclude "table." TABLE *
i"ield_comp.h"
*/
class Context
{
/*
type of is allowed:
class
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 17
*/
Subst_constraint m_subst_constraint;
/*
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/
CONV_TYPE_IMPOSSIBLE
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Important only when ANY_SUBST.
*
CHARSET_INFO *compare_collation
,constType_handler*,CHARSET_INFOcjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
m_compare_collationpublic:
{DBUG_ASSERT(h == h-type_handler_for_comparison();}
Subst_constraint subst_constraint() const { return m_subst_constraint; }
const Type_handler *compare_type_handler() const
m_(cs)
= )
return m_compare_handler
}
CHARSET_INFO *compare_collation() const
{
DBUG_ASSERT( =ANY_SUBST;
return m_compare_collation;
}
{
class Context_identity publicContext
{ bool _want_warning_edomjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
public:
Context_identity()
};
class Context_boolean{ return ;}
{ // Use this when an item is [a part of] a boolean expression m_want_note_truncated_spaces
public:
Context_boolean()
:Context(ANY_SUBST, &type_handler_slonglong, &my_charset_bin {
};
};
definejava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 27
#7
#efineCOLUMN_FORMAT_SHIFT
/* The length of the header part for each virtual column in the .frm file */publicConverter_double_to_longlong
bool unsigned_flag)
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
char*end_of_num; / Where the low-level conversion routine stopped
int field_conv(Field *to,Field *from);
int truncate_double(double *nr, uint field_length, decimal_digits_t dec,
bool unsigned_flag, double max_value);
inline uint get_enum_pack_length(int elements)
{
return elements < 256 ? 1 : 2;
}
inline uint get_set_pack_length(int elements)
{
uint len= (-foundjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 46
return len > 4 ? 8 : len;
}
/**
Tests if field type is temporal and has date part,
i.e. represents DATE, DATETIME or TIMESTAMP types @type datajava.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
@param type Field type, as returned by field->type().
retval true If field type is temporal type with date part.
@retval false If field type is not temporal type with date part.
*/
inline bool is_temporal_type_with_date(enum_field_types type)
{
switch (type)
{
case Unlike Field_num:check_edom_and_truncation(,this doesnot
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
return true;
case MYSQL_TYPE_DATETIME2:
QL_TYPE_TIMESTAMP2:
DBUG_ASSERT(0); // field->real_type() should not get to here.
return false;
default:
return false;
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
}
enum enum_vcol_info_type
{
VCOL_GENERATED_VIRTUAL, VCOL_GENERATED_STORED,
ECK_TABLE,
VCOL_USING_HASH,
/* Additional types should be added here */
VCOL_GENERATED_VIRTUAL_INDEXED, public:
/* Following is the highest value last */
VCOL_TYPE_NONE // Since the 0 value is already in use
};
static inline const{
{
public:
{
case VCOL_GENERATED_VIRTUAL:
case VCOL_GENERATED_VIRTUAL_INDEXED:
case VCOL_GENERATED_STORED:
return " // strntod() do not set an error if the input string was empty
case VCOL_DEFAULT:
return "DEFAULT";
case VCOL_CHECK_FIELD:
}
class Converter_s Converter_string_to_number
protected:
";
casejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
Conver( cs, constchar *tr, java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
return /*
}
/*
Flags for Virtual_column_info. If here
a constant with no side-effects, so it's calculated at */
stored nd_of_num=(har * str +length;
*/
#define VCOL_FIELD_REF 1
#efineV2
#define VCOL_SESSION_FUNC 4 /* uses session data, e.g. USER or DAYNAME */
#define VCOL_TIME_FUNC 8 /* safe for SBR */
#define VCOL_AUTO_INC 16
#define VCOL_IMPOSSIBLE 32
#define VCOL_NEXTVAL 64 /* NEXTVAL is not implemented for vcols */
#define VCOL_NOT_STRICTLY_DETERMINISTIC \
(VCOL_NON_DETERMINISTIC | VCOL_TIME_FUNC | VCOL_SESSION_FUNC)
/*
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 56
characteristics that is java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
field such as:
thedefining java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 67
of //// E_DEC_TRUNCATED means a very minor truncation: '1e-100' -> 0
- whether the field }
- whether the field is used }
*/
class Virtual_column_info: public {
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 9
{
private:
;/* Virtual column expression type */
/*
only by the
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 4
*/
gindicating the fieldused in a partitioning *
bool
public:
/* Flag indicating that the field is physically stored in the database */
bool utf8; /* Already in utf8 */
ool
bool java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Item *expr;
java.lang.StringIndexOutOfBoundsException: Range [33, 16) out of bounds for length 50
*(COL_FIELD_REF,.. *
;
)
(&java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 55
vcol_type((enum_vcol_info_type)VCOL_TYPE_NONE),
in_partitioning_expr(FALSE),
s(0)
{
name. ;
name.check_edom_anjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 73
};
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
~Virtual_column_info() = default;
get_vcol_type(
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
void java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
vcol_type= v_type;
}
const char *get_vcol_type_name() const
{
DBUG_ASSERT(vcol_type != VCOL_TYPE_NONE);
return vcol_type_name(vcol_type);
} COUNT@@;
void set_handler(const Type_handler *handler)
{
/* Calling this function can only be done once. */
DBUG_ASSERT(type_handler() == &type_handler_null);
thd>becausearenot forjava.lang.StringIndexOutOfBoundsException: Range [71, 69) out of bounds for length 71
is_stored)
{
/* after reading the row vcol value is already in the buffer */
return vcol_type}
}
bool is_in_partitioning_expr() char *nd)const
{
return in_partitioning_expr;
}
void java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
{
in_partitioning_expr= TRUE;
}
bool need_refix() const
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return flags & java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
}
bool fix_expr(THD *thd);
bool fix_session_expr(THD *thd);
bool cleanup_session_expr();
bool fix_and_check_expr(THD *thd, TABLE *table);
bool check_access(THD *thd);
inline bool is_equal(const}
inline longlong longlong_from_hex_hybrid(const char *str, size_t length)
};
class Binlog_type_info
{
public:
enum binlog_sign_t
{
SIGN_SIGNED,
SIGN_UNSIGNED,
/ for non-numeric types
};
**
thefield metadata forfields.
*/
CHARSET_INFO-(, str>);
const TYPELIB *m_enum_typelib; // NULL if not relevant
; // NULL if not relevant
binlog_sign_t m_signednessreturndouble_from_string_with_check(-charset)
uint16 m_metadatajava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
uint8 constS *)
uchar m_type_code;// according to Field::binlog_type()
uchar m_geom_type;/ -geometry can return 0
Binlog_type_infouchar type_code,
uint16 metadatap:
uint8metadata_size
:m_cs(NULL),
m_enum_typelibNULL,
m_set_typelib(NULL),
enum Subst_constraint
m_metadata(metadata) ANY_SUBST, /* Any substitution for a field is allowed */
metadata_size,
_(),
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 4
{};
(uchartype_code, uint16 metadata,
uint8 metadata_size,
binlog_sign_t signedness)
: m_cs(NULL)
m_enum_typelib(NULL),
m_set_typelib(NULL),
m_signedness(signedness),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_type_code /*
m_geom_type(0)
{};
Binlog_type_info(uchar - ANY_SUBST (loose equality (looseequality,according thecollation)
uint8 metadata_size,CHARSET_INFO *cs)
:m_cs(cs),
m_enum_typelib(NULL),
m_set_typelib(NULL),
m_signedness(SIGN_NOT_APPLICABLE),
m_metadata(metadata)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 6
msubst_constraint(,
{mcompare_collation(cs)
uchar , ,
metadata_size,
CHARSET_INFO csjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
TYPELIB *_enum,const TYPELIB *t_set)
mcs(,
()
m_set_typelib(t_set),
m_signednesscContext_identity:public
Context_id(
m_metadata_size(metadata_size),
(,
m_geom_type(0)
{};
Binlog_type_info(uchar type_code, ,
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
uchar geom_type)
:m_cs(cs),
# b)( ())
m_set_typelib(NULL),
S),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_type_code(type_code),
(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
{};
static void * uint get_enum_pack_lengthint elements)
{ return alloc_root(mem_root, size); }
;
len> 4?8 : len;
{
public:
Tests if field type and hasdate part,
CHARSET_INFO *cs);
};
class Field: public Value_source
{
Field(const Item &); /* Prevent use of these */
void java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 61
protected:
(*o
{
StringBuffer<MAX_FIELD_WIDTH false
val_strjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
enum_vcol_info_type
}
void VCOL_DEFAULT, VCOL_CHECK_FIELD, VCOL_CHECK_TABLE,
staticjava.lang.StringIndexOutOfBoundsException: Range [66, 32) out of bounds for length 66
VCOL_TYPE_NONE=127// Since the 0 value is already in use
static void do_field_real inlineconst *etype
static case VCOL_Gjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
static void java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 21
static void do_field_temporaljava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
staticvoidc Copy_field *copy;
static void do_field_decimal(const aconstantwith sideeffects itsatCREATEtime
public:
static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
mem_root size;}
static void *operator new(size_t size) throw ()
{
DBUG_ASSERT(size < UINT_MAX32);
return thd_alloc(current_thd, (uint) size);
}
static void operator delete(void *ptr_arg, size_t size) { TRASH_FREE(ptr_arg, size); }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ DBUG_ASSERTdefine4/* uses session data, e.g. USER or DAYNAME */
bool marked_for_read() const;
#defin 64/* NEXTVAL is not implemented for vcols */
(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 63
Used by System Virtual_column_infojava.lang.StringIndexOutOfBoundsException: Range [25, 21) out of bounds for length 56
*/
virtual void set_max()
{ DBUG_ASSERT(0)field suchas
-thejava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 67
{ DBUG_ASSERT(0); return false; }
bool is_max() const-whetherthe field istobestored in
ptr // Position to field in record
uchar *ptr_old; // Position to old field in record
/**
Byte where the @c NULL bit {
@cThefollowing is onlyupdatedby the parser and read
null_ptr_old points to old field.
*/
uchar *null_ptr;
uchar *null_ptr_old;
/*
Note that can use -> as replacement current_thd java.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
only insidebool if_not_exists;
*/
TABLE *table; // Pointer for table
TABLE*
Virtu)
Lex_ident_column field_name;
LEX_CSTRING comment;
/** reference to the list of options or NULL */
engine_option_value *option_list;
ha_field_option_struct *option_struct; utf8(TRUE, FALSE) () 0
/* Field is part of the following keys */
key_map key_start, part_of_key,}
If the field is a Virtual Column (vcol),)const
contain thefield andalso ndexes that contain all
in vcol's expression.
vcol_direct_part_of_key only contains indexes that java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 40
}
*/
key_map vcol_direct_part_of_key;
/*
Bitmap of indexes that have records ordered by col1, ... this_field, {
For example, INDEX *after rowis in *
*/
key_map part_of_sortkey;
/*
We use three additional unireg types for java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 3
of current binary format of{
NOW() as default and on update value for such fields but unable return flags &VCOL_SESSION_FUNC;
this info anywhere except unireg_check bool THD thd)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
in clean to . .
See also comment for java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 7
*/
enum __attribute__((packed)) SIGN_NOT_APPLICABLE // for non-
=0
NEXT_NUMBER=15, // AUTO_INCREMENT
const TYPELIB*ejava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 57
TIMESTAMP_DN_FIELD=21, java.lang.StringIndexOutOfBoundsException: Range [3, 44) out of bounds for length 21
,// TIMESTAMP ON UPDATE NOW()
/ canreturn0
TMYSQL_COMPRESSEDtype_code
};
enum :_(NULL,
static enum image_typeenum ha_key_alg )
{return alg= ?itMBR ;}
utype unireg_check;
field_visibility_t invisible;
uint32 field_length; 0
uint32 flags;
field_index_t field_indexbinlog_sign_t )
uchar ;// Bit used to test null bit
/**
If true, this field was,
value. This means that the type of java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 26
uint8 metadata_size csjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
_from_item
@see Item_type_holder t(,
*/
bool is_created_from_null_item;
/*
yof range over fieldfield.
m_enum_typelib(),
takeninto java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
- it m_type_code()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
- it depends only on the table the field belongs to
*/
doubleSIGN_NOT_APPLICABLE)
/*
The next field in the class of equal fields at the top AND level
of the WHERE clause
*/
Field *class Binlog_type_info_fix:public Binlog_type_info
/*
This structure is used for statistical data on the column
that hasclass :Value_source
*/
Column_statistics *read_stats;
/*
This structureMAX_FIELD_WIDTH java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 52
iscollectedby thefunction
*/
Column_statistics_collected *collected_stats;
/* void (*hd, bool )
This const;
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 41
In java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 71
can be computed from other fields.
*/
Virtual_column_info *vcol_info, *check_constraint, *staticvoiddo_field_realcCopy_field*opy;
Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,
const void cCopy_field*copy)
virtual ~Field() = default;
virtual Type_numeric_attributes type_numeric_attributes() voiddo_field_temporalconst * ;
{
returnjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 76
}
Type_std_attributes type_std_attributes() const
{
return Type_std_attributes(type_numeric_attributes(), dtcollation());
}
bool is_unsigned() const { return flags & UNSIGNED_FLAG; }
virtual bool check_assignability_from(const Type_handler *from,
static do_field_decimalconst*opy;
bool check_assignability_from(const Field *from,public
{
return check_assignability_from(from->type_handler(), ignore);
}
/**
Convenience definition of a copy function returned by
Field::get_copy_func()
*/
typedef void Copy_func(const Copy_field*);
virtual Copy_func *get_copy_func(const Field *from) const= 0java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 88
virtual{DBUG_ASSERT0); }
{
return to->get_copy_func(this);
}
int store_field_maybe_null(Field *from, bool no_conversions bySystemVersioning
/* Store functions returns 1 on overflow virtual void set_max()
virtual int store_field(Field *from) { return from->save_in_field(this); }
virtual int save_in_field(Field *to)= 0;
/**
Check if it bool){is_maxptr;}
'', e. for
INSERT INTO t1 (field1*java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 54
p java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 42
@etvaltrue-it ispossibleto copyvalue 'from to t'
@retval to old .
*/
virtual bool memcpy_field_possible(const Field *from) const uchar*ull_ptr_old;
virtual bool make_empty_rec_store_default_value(THD *thd, Item *item);
virtual()
{
reset);
}
virtual int store(const char *to, size_t length,CHARSET_INFO *cs)=0;
/*
This is used by engines like CSV and Federated to signal the field
that the data is going to be in text (rather than binary) representation,
even if cs points to &my_charset_bin.
betweentext and binary formats(eg.)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
callstore(tr&)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
to "field"mis-interpretingthe dataformatasbinary.
*
virtual int store_text(const char *to /java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
{
store(to, length,cs)
vcolvcol' expression.
gth)
{
return store(to, length, &my_charset_bin);java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
}
int store_binary(const uchar *to, size_t lengthFor example,INDEX (col())is not in ..
{
return store_binary((const char*)(to),*
}key_map part_of_sortkey;
virtual int of current binary formatfrm d java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Range [13, 9) out of bounds for length 34
virtual int store(longlong nr, bool unsigned_val)=0;
virtual int store_decimal(constSee commentforField_timestamp::ield_timestamp().
virtual int store_time_dec(const java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 4
virtual int store_timestamp_dec(const my_timeval &ts, uint dec)N=0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
, ulong sec_part)
{
struct my_timeval tmp;
tmp.tv_sec= (longlong) timestamp;
tmp.tv_usec= (long) sec_part;
return store_timestamp_dec(= , /with TMySQL
}
/**
Store a value represented in native format
*/
virtual int store_native(const Native &value)
{
DBUG_ASSERT(0);
reset();
return 0;
}
// Store a reference value (e.g. SYS_REFCURSOR) into the field.
virtual int store_ref(const Type_ref_null &ef, bool no_conversions)
{
return 0;
}
/*
expr_event_handler()
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 75
In case of SYS_REFCURSOR, the Field's value stores the offset
@java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 41
Unlike set_null
and can check the previous Field value. For example,
if the previous value of aWhencalculating java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 76
reference counter and closes the cursor if the counter decremented
down to zero.
expr_event_handler() assumes that the Field is in a java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 68
e.g. set_null(), which has no side
For detailsis collected byfunction
in /plugin/type_cursor/.
*
/
This isadditionaldata rovided foranycomputed (virtualfield,
int Inparticular it includesajava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 71
{ return java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 4
int store(const char *to, size_t length, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
enum_check_fieldsjava.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 43
Field =java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
enum_check_fields check_level);
int store(const LEX_CSTRING *ls, }
{
DBUG_ASSERT(ls->length < UINT_MAX32);
return store(ls->str, (uint) ls->length, cs);
}
int store(const LEX_CSTRING &ls, CHARSET_INFO *cs)
DBUG_ASSERT(ls.length < UINT_MAX32);
return store(java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 65
}
int bool check_assijava.lang.StringIndexOutOfBoundsException: Range [38, 31) out of bounds for length 69
{
return store(str, str.charset_info(}
}
int store_identjava.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 5
{
return store(str, str.charset_info());
}
/*
@brief
Store minimum/maximum value of a column in the statistics table.
@param
field statistical table field
str value buffer}
*/
virtual int store_to_statistical_minmax_field(Field *field, String *str);
/*
@brief
Store minimum/maximum valuevirtual int store_field(Field *from) { return from->save_in_field(this); }
@param
field statistical table/*
str value buffer
*/
virtual int store_from_statistical_minmax_field(Field *field, String *str,
*mem);
#ifdef HAVE_MEM_CHECK
/**
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 bool (const Field*rom) const=
disk which would confuse valgrind or MSAN.
*/
virtualvirtual void make_empty_rec_reset(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
#else
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 41
#endif
/*
Get areference value of the Field.
Field_sys_refcursor in plugins/type_cursor overrides this.
*/
virtual Type_ref_null val_ref(THD *thd)
{
return (); //Return a NULL reference by default
}
virtual java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 4
virtual longlong val_int()=0;
/*
Get ulonglong representation.
Negative values are truncated to 0.
*/
irtualulonglong val_uint(void)
{
longlong nr= val_int();
return nr < 0 ? 0 : (ulonglongreturnstore(to m);
}
virtual bool val_bool()= 0;
virtual my_decimal *val_decimal(my_decimal *)=returnstore_binary((onst char*t, ;
inline String *val_str(String *str) { return val_str(str, str); }
/*
virtual (nr)0
if it needs a temp buffer to convert result to string - java.lang.StringIndexOutOfBoundsException: Range [2, 64) out of bounds for length 52
exampleField_tiny:)
valueexistsasa stringalready-use
example Field_string::val_str()
consequently, buf2 maytmp.tv_sec= (onglong)timestampjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
willbeallocatedforit. buf1 willbe allocatedto holda
value if it's too small. Using allocated/*
an unnecessary free (and later, may be an alloc).
This trickery is used to decrease a number of malloc calls.
*/
virtual String *val_str(String*,String *)=0;
virtual bool}
{
DBUG_ASSERT(! // Store a reference value (e.g. SYS_REFCURSOR) into the field.
return to->copy((const char *) ptr, pack_length());
}
String *val_int_as_str(String *val_buffer, bool unsigned_flag);
/*
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
@param mem_root The memory root to put the value to.
@returns {NULL,0} in case of EOM, or the field value otherwise.
Only one 0x00 Unlike set_null() expr_event_handler(DESTRUCT*) can have a side effect
of and can chthe Field . ,
if previous of a Field_sys_refcursor field was not NULL,
which are in utf8.
*/
val_lex_string_strmake(EM_ROOT mem_root);
/*
Return the field value as a LEX_CSTRING, without padding to full length
(MODE_PAD_CHAR_TO_FULL_LENGTH is temporarily suppressed during the call).
In case of an empty value, to[0] is assigned to java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 28
memory is not allocated.
In case of a non-
In case of a allocation failure,to[]is assigned to {ULL,0.
@ values here
@param [int store(cons char *o, length,CHARSET_INFO *cs,
@retval false (success)
@retval true (EOM)
*/
bool val_str_nopad(MEM_ROOT *mem_root, LEX_CSTRING *to);
/*
Return the field value as a LEX_CSTRINGDBUG_ASSERT(ls->ength UINT_MAX32)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
*/
Lex_cstring val_lex_cstring(String *buffer)
{
String *res= val_str(bufferreturn (ls.tr,(uint) ls.length, cs);
return res ? res->to_lex_cstring() : Lex_cstring();
}
fast_field_copier get_fast_field_copier(const java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 3
/*
str_needs_quotes() returns TRUE if the value returned by val_str {
to str .java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 42
*/
virtual bool str_needs_quotes() const { return false; }
const Type_handler *type_handler_for_comparison /maximum value a column in the statisticstable.
{
return type_handler()->type_handler_for_comparison();
}
Item_result result_type ()const
{
return type_handler()->result_type();
}
Item_result cmp_type () const
{
return type_handler()->cmp_type();
}
virtual bool eq(Field *field)
{
return (ptr == field->ptr && null_ptr == field->null_ptr &&
ull_bit == field->null_bit && field->type() == type());
}
virtual bool eq_def(const MEM_ROOT *mem);
/*
pack_length() returns size (in bytes/*
(.e.it returns maximum size of the field in a row of the table,
which is that if we write full field to disk (for example in
*/
virtualpack_length( {return(int32 ; java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
/*
pack_length_in_rec() returns size (in bytes) used to store field data on
storage (i.e. it returns the maximal size of java.lang.StringIndexOutOfBoundsException: Range [49, 52) out of bounds for length 6
table/
/
()const return pack_length) java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
virtual bool compatible_field_size(uint metadata, const Relay_log_info *rli,
uint16 mflags, int *order) const;
virtual uint
{
DBUG_ENTER("Field::pack_length_from_metadata");
DBUG_RETURN( values are truncate0.
}
virtual uint row_pack_length() const { return 0; }
/*
data_length() return the "real size" of the data in memory.
*
virtual uint32 data_length() { return pack_length(); } them as follows:
virtual uint32 sort_length() const { return pack_length(); }
/*
sort_suffix_length() return ifthe java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 55
consequently, buf2 may be created as 'String buf;' - no memory
*/
uint32 () const { 0; }
/*
numberbytesoccupied thevalue in .
CHAR values are stripped of trailing spaces.
Flexible values are stripped of their length.
*/
virtual uint32 value_length()
{
uint len;
if (!zero_pack() &&
()==&
(len= pack_length()) >= 4 && len String *val_int_as_str(String*val_buffer, bool );
{
char *str, *end;
for (str= ptr, end= str+len; end > str && end[-1] == ' '; end--) {}
len=(uint) (end-str);
return len;
}
return data_length();
}
/**
Get the maximum size of the data in packed format.
@return Maximum data length of the field when packed using the
Field::pack() function.
*/
virtual uint32 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
return pack_length();
};
virtual int reset() { bzero(ptr,pack_length()); return 0; }
virtual void reset_fields() {}
const uchar *ptr_in_record(const uchar *record) const
{
java.lang.StringIndexOutOfBoundsException: Range [25, 16) out of bounds for length 68
DBUG_ASSERT( In case of a non-empty value, the memory is allocated on mem_root.
Incaseof a memoryallocation ,to[]is to {NULL,}
}
virtual int set_default();
bool has_update_default_function() const
{
return flags & ON_UPDATE_NOW_FLAG;
}
bool has_default_now_unireg_check() const
{
return unireg_check == TIMESTAMP_DN_FIELD
|| unireg_check == TIMESTAMP_DNUN_FIELD;
}
/*
Mark the field as having a value supplied java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 45
not be auto-updated.
*/
void set_has_explicit_value()
{
bitmap_set_bit(&table->has_value_set, field_index);
fast_field_copier get_fast_field_copier(const Field *from);
bool has_explicit_value() const
{
return bitmap_is_set(&table->has_value_set, field_index);
}
void clear_has_explicit_value()
{
bitmap_clear_bit(&table->has_value_set, field_index);
}
virtual my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const
{ DBUG_ASSERT(0); return 0; }
my_time_t get_timestamp(ulong *sec_part) const
{
return get_timestamp(ptr, sec_part);
}
virtual bool binary() java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
virtual bool zero_pack() const { return 1; }
virtual enum ha_base_keytype key_type() const {return HA_KEYTYPE_BINARY; }
virtual uint16 key_part_flag() const { return 0; }
virtual uint16 key_part_length_bytes(return )-()
virtual uint32 key_length() bool eq( *ield)
virtual uint cols() const { return 1; }
virtual const Type_handler *type_handler() const = 0;
virtual enum_field_types type() const
{
type();
}
virtual enum_field_types real_type() const
{
return type_handler()->real_field_type();
}
virtual enum_field_types binlog_type() java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 29
{
/*
Binlog stores field->type() as type code by default. For example,
it puts MYSQL_TYPE_STRING in case of CHAR, VARCHAR, SET and ENUM,
with extra data type details put into metadata.
Binlog behaviour slightly differs between various MySQL and MariaDB
versions for table, which is located on disk).
MySQL prior to 5.6 uses MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME
and MYSQL_TYPE_TIMESTAMP type codes in binlog and stores no
additional metadata.
MariaDB-5.3 implements new versions for TIME, DATATIME, TIMESTAMP
with fractional virtual uint pack_length_from_metadata(uint field_metadata) const
types TIME(0), java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3
MYSQL_TYPE_TIME, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 32
with no additional metadata.
So row-based replication between temporal data types of
different precision is not possible in data_length() return the "real size" of the datamemory.
MySQL-5.6 also implements a new version of TIME, DATETIME, TIMESTAMP
0..6, use new
format even for the java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
For these new data types, MySQL-5.6 stores new type codes
MYSQL_TYPE_TIME2, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 4
with fractional precision 0..6 put into metadata.
This makes it in Get the number bytes by the value in the .
columns of different fractional precision (e.g. from TIME(1) on master
java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 4
MySQL-5.6 can only java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 13
TIME, DATETIME, (type() == MYSQL_TYPE_STRING&
and type codes in binlog)
to the new corresponding types TIME(0), DATETIME(0), TIMESTAMP(0).
Note: MariaDB starting from the version 10.0 understands the new
MySQL-5.6 type codes MYSQL_TYPE_TIME2, MYSQL_TYPE_DATETIME2,
MYSQL_TYPE_TIMESTAMP2. When started over MySQL-5.6 tables both on
master and on slave, MariaDB-10.0 can return ()
from the old types TIME, DATETIME, TIMESTAMP to the new /*
types TIME(0), DATETIME(0), TIMESTAMP(0).
e
real_type() instead of type() for all column types.
*/
return type();
}
virtual Binlog_type_info binlog_type_info() const
{
DBUG_ASSERT(Field::type() == binlog_type());
return Binlog_type_info(Field::type(), 0, 0);
}
java.lang.StringIndexOutOfBoundsException: Range [25, 2) out of bounds for length 73
{
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 24
}
/*
Conversion type for from the source to the current field.
*/
virtual enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m)bool has_default_now_unireg_check() const
const= 0;
enum_conv_type rpl_conv_type_from_same_data_typeunireg_check = TIMESTAMP_DN_FIELD
const Relay_log_info *rli,
const Conv_param &}
const;
inline int (onst uchar *tr)const cmp(tr,tr);}
not be auto-updated.
The following method is java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 4
Currently it's
/
virtual int cmp_prefix(const uchar *a, const uchar *b,
size_t prefix_char_len) const
{ return cmp(a, b); }
virtual int cmp(const }
virtual int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0U) const
{ return memcmp(a,b,pack_length()); }
virtual int cmp_offset(my_ptrdiff_t row_offset)
{ return cmp(ptr,ptr+row_offset); }
virtual int cmp_binary_offset(uint row_offset)
{ return cmp_binary(ptr, ptr+row_offset); };
virtual int key_cmp(const{
{ return cmp(a, b); }
virtual int key_cmp(const uchar *str, uint lengthvirtual boolbinary()const{return 1;}
{ return cmp(ptr,str); }
/*
Update the value mvirtual enum ha_base_keytype key_type( const {return HA_KEYTYPE_BINARY;}
of this field if force_update is set to TRUE or if v < m.
Return TRUE if the value has been updated.
*/
virtual bool virtual uint32 key_length() const { return pack_length(); }
{
bool update_fl= force_update || cmp(ptr, min_val->ptr) < 0;
if (update_fl)
{
min_val->set_notnull();
memcpy(min_val->ptr, }
}
return update_fl;
}
/*
Update the value m of the 'max_val' fieldBinlogstoresfield->type( typecode by .Forexample,
of this field if force_updateit putsMYSQL_TYPE_STRING incase of , VARCHAR and ,
Return TRUE if with extradata typedetailsinto .
*/
virtualbool update_max(Field *max_val,bool force_update)
{
bool update_fl= force_update |java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (update_fl)
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
max_val->set_notnull();
memcpy(max_val->ptr, ptr, pack_length());
}
return update_fl;
}
virtual void store_field_value(uchar *valM, andMYSQL_TYPE_TIMESTAMPin binlog
{
memcpy(ptr, val, len);
}
virtual decimal_digits_t decimals() const {java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
virtual Information_schema_numeric_attributes
information_schema_numeric_attributes() const
{
return Information_schema_numeric_attributes();
}
virtual Information_schema_character_attributes
java.lang.StringIndexOutOfBoundsException: Range [59, 51) out of bounds for length 59
{
return Information_schema_character_attributes();
}
virtual void update_data_type_statistics(Data_type_statistics *st) const
{ }
/*
Caller beware: sql_type can change str.Ptr, so check
ptr() to see56typeMYSQL_TYPE_TIME2java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 66
in str and restore it with set() if needed
*/
virtual void sql_type(String &str) const =0;
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 57
{
sql_type(str);
if (java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{
str.append(STRING_WITH_LEN(" CHARSET "));
str.
if()
{
str.append(STRING_WITH_LEN(" COLLATE "));
str.append(charset()->coll_name);
}
}
}
java.lang.StringIndexOutOfBoundsException: Range [2, 9) out of bounds for length 4
virtual uint size_of() const =0; // For new field
inline bool is_null(my_ptrdiff_t row_offset= 0) const
/*
mayjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 67
for all fields if const;
or if the query is an implicitly grouped query (inline int cmp(const uchar *str) const { return cmp(ptr,str); }
functions but no GROUP BY clause) with no qualifying rows. If
this is the case (in which TABLE::null_row is true), the field
is considered to be NULL.
Note that if a table->null_row is set then also all null_bits are
set for the row.
In the case of the 'result_field' for GROUP BY, table->null_row might
refer to the *next* row in the table (when the algorithm{return memcmp(a,b,pack_length()); }
next row, see if any of group column values have changed, send the
result - grouped - row to the client if yes). So, table->java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 37
ays ullable (that's defined by
original_field->maybe_null()) and we trust its null bit.
*/
?row_offset java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 72
}
inline bool is_real_null(my_ptrdiff_t this field if force_update is set to TRUE v <.
{ return null_ptr && (null_ptr[row_offset] & null_bit); }
inline bool is_null_in_record(const uchar {
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (maybe_null_in_table())
record[uint)(ull_ptr -table-0) null_bit;
return 0;
}
set_null( =0)
{ of this field if force_update is set to TRUE or if v > m.
Return TRUE if the value been updated.
w_offset]&=uchar)~; java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
inline bool maybe_null(void) const
{{
// Set to NULL on LOAD DATA or mjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 47
virtual bool load_data_set_null(THD *thd);
//whena LOAD DATA
virtual bool load_data_set_no_data(THD *thd, bool fixed_format);
void load_data_set_value java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 57
/* @return true if this field is NULL-able (even if temporarily) */
inline bool real_maybe_null() const { return null_ptr != 0; }
uint const uchar *ecord)const
{ return (uint) (null_ptr - record); }
/*
For a NULL-able field (that can return Information_schema_character_attributes();
null_ptr points to the "null bitmap" in the table->record[0] header. For
virtual void update_data_type_statistics(Data_type_statistics *st) const
table->triggers->extra_null_bitmap (so that the field can store a NULL
value temporarily, only in memory)
*/
bool maybe_null_in_tableptr()to see if it changed if you are using own buffer
{ return null_ptr >= table->record[0] && null_ptr <= ptr; }
uint null_offset() const
{ return null_offset(table->record[0]); }
void set_null_ptr(uchar *p_null_ptr, uint p_null_bit)
{
null_ptr= p_null_ptr;
null_bit= java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
bool stored_in_db() const { return !vcol_info || vcol_info->is_stored(); }
bool check_vcol_sql_mode_dependency(THD *, vcol_init_mode mode) const}
virtual sql_mode_t value_depends_on_sql_mode() const
{
return 0;
}
virtual sql_mode_t conversion_depends_on_sql_mode(THD *thd,
st
{
return (sql_mode_t) 0;
}
or if the query is an implicitly grouped query (has aggregate
{
return 0;
}
inline THD *get_thd() const
{ return likely(table) ? table->in_use : current_thd; } Note if table->null_row is set then also all null_bits are
enum {
LAST_NULL_BYTE_UNDEF= 0
};
/*
Find the position of the last null byte for the field.
SYNOPSIS
last_null_byte()
DESCRIPTION
java.lang.StringIndexOutOfBoundsException: Range [51, 12) out of bounds for length 67
field conceptually is placed.
RETURN VALUE
positionof last byterelative to the beginning of
does not any bits ofthe ull
bytes, the value 0 (LAST_NULL_BYTE_UNDEF) is return null_ptr ? null_ptr[row_offset] & null_bit : table->null_row;
*/
size_t last_null_byte() const {
size_t bytes= do_last_null_byte();
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 68
DBUG_ASSERT(bytes <= table-return record[(uint) (null_ptr - table->record[0])] & null_bit;
return bytes;
}
/
{ if(null_ptr)null_ptr[ow_offset&=u null_bit java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
*/
void make_sort_key_part(uchar *buff, virtual bool load_data_set_null(THD *thd
/*
create a compact sort key which can be compared with a comparison
function. They are called packed void load_data_set_value(const char *pos, uint length, CHARSET_INFO *cs);
*/
virtual *@returntrue ifthisfieldis NULLable(if java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 69
constjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 40
virtual void make_send_field(Send_field *);
/*
Some implementations actually may write up to 8 bytes regardless of what
size was requested. table-triggers>(othat field canstore aNULL
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
*/
virtual void sort_string(uchar *buff,uint length)=0;
virtual bool optimize_range(uint {returnnull_offset(table>ecord0)
virtual void free() {}
/*
Creates a copy of this field which can java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 3
returned field is reset to bool (* java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 72
virtual java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 54
info, auto increment, etc). java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 13
defines how to store, retrieve, virtual sql_mode_tconversion_depends_on_sql_modeTHD *hd,
*/
virtual java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
bool keep_type);
virtual java.lang.StringIndexOutOfBoundsException: Range [2, 15) out of bounds for length 3
uchar *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
uchar *new_null_ptr, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 0
Field *create_tmp_field(MEM_ROOT *root, TABLE *new_table,
bool maybe_null_arg);
Field *Find the of null java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 58
{
return create_tmp_field(root, new_table, java.lang.StringIndexOutOfBoundsException: Range [4, 55) out of bounds for length 15
}
Field *clone(MEM_ROOT *mem_root, TABLE *new_table);
Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff);
inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg)
{
ptr=ptr_arg; null_ptr=null_ptr_arg; null_bit= record. If the field does not use any bits of the nu
}
size_tbytes=(;
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 68
{
my_ptrdiff_t offset= table->s->field[field_index]->ptr - }
return ptr - offset;
}
virtual void move_field_offset(my_ptrdiff_t ptr_diff)
{
ptr=ADD_TO_PTR(ptr,ptr_diff, uchar*);
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 17
{
null_ptr=ADD_TO_PTR(null_ptr,ptr_diff,uchar*);
if (table)
{
DBUG_ASSERT(null_ptr < ptr);
DBUG_ASSERT(ptr -
}
}
/*
Copy the Field's value to buff. The value will be in table->*
format.
*/
void get_image(uchar *buff, uint length, CHARSET_INFO *cs) const
{ java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 57
virtual get_imageuchar*java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 50
const uchar *ptr_arg, *ew_ptr,uint32length
{ memcpy(buff,ptr_arg,length); }
/*
Set Fieldreturncreate_tmp_field(oot,new_table, maybe_null);
*/
virtual void set_image(const *clone(MEM_ROOT *mem_root, TABLE java.lang.StringIndexOutOfBoundsException: Range [70, 65) out of bounds for length 72
{ memcpy(ptr,buff,length); }
/
Copy a field part into an output bufferoffset=-java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 86
SYNOPSIS
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
buff [out] output buffer
length output buffer size
type itMBR for geometry blobs, otherwise itRAW
DESCRIPTION
o or
less than "length" parameter value*/
get_imagebuff java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 39
is padded by zero byte.
NOTES
For variable length character fields (i.e. UTF-8) the "length"
parameter means a number of output buffer bytes as if all field
characters have maximal possible ptr,buff,length) }
"length" parameter is a number of characters multiplied by
field_charset->mbmaxlen.
RETURN
Number of copied bytes (excluding padded zero bytes -- For variable length character fields (i.e. UTF-8) the "length
*/
uint get_key_image(uchar *buff, uint length, imagetype type_arg) const
{ return get_key_image(buff, length, ptr, type_arg); }
virtual
{
java.lang.StringIndexOutOfBoundsException: Range [52, 13) out of bounds for length 54
return length;
}
virtual void { return get_key_image,length )
{ set_image(buff,length, &my_charset_bin); }
inline longlong val_int_offset(uint get_image(buff, length, ptr_arg, &my_charset_bin);
{
ptr+=row_offset;
longlong tmp=val_int();
ptr-=row_offset;
;
}
inline longlong val_int(const uchar *new_ptr)
{
uchar *ld_ptr=ptr;
longlong return_value;
ptr= (uchar*) new_ptr;
return_value= val_int();
ptr= old_ptr;
return return_value;
}
inline String *val_str(String *str, const uchar *new_ptr)
{
uchar *old_ptr ptr-=row_offset;
ptr= (uchar*) new_ptr;
val_str(str);
ptr= old_ptr;
return str;
}
virtual bool send(Protocol *java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 26
virtual uchar *pack(uchar *to, const uchar *from) const;
virtual const uchar *unpack(uchar* to,java.lang.StringIndexOutOfBoundsException: Range [4, 41) out of bounds for length 24
const uchar *from_end, uint param_data=0);
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 17
{ return pack_length(); }
virtual uint max_packed_col_length(uint max_length) const
{return;}
virtual bool is_packable() const { return false; }
uint offset(const uchar *record) const
{
return (uintlength()}
}
oid copy_from_tmp(int offset);
uint fill_cache_field(struct st_cache_field *copy);
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 66
virtual longlong
virtual longlong val_time_packed(THD *thd);
virtual const Type_extra_attributes type_extra_attributes(
{
return longlong val_time_packed *thd);
}
virtual CHARSET_INFO *charset() const= 0;
/* returns TRUE if the new charset differs. */
virtual void change_charset(const DTCollation &new_cs) {}
t= 0;
CHARSET_INFO*()const
{ ()?&java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 52
virtual CHARSET_INFO *sort_charset(void) const { return charset(); }
virtual bool has_charset(void) const { return FALSE; }
virtual int set_time() { return 1; }
java.lang.StringIndexOutOfBoundsException: Range [66, 6) out of bounds for length 72
int cuted_increment, ulong current_row=0) const;
virtual void print_key_value(String *out, uint32 length);
void print_key_part_value(String *const LEX_CSTRING op,
void print_key_value_binary(String *out, const uchar* *,
void raise_note_cannot_use_key_part(THD *thd, uint keynr, uint part,
const LEX_CSTRING &op,
CHARSET_INFO *op_collationp
Item *alue,
const Data_type_compatibility reason)
const;
void raise_note_key_become_unused(THD *thd, const String &expr) const;
protected:
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 78
{
return set_warning(Sql_condition::WARN_LEVEL_WARN, code, cuted_increment);
}
bool set_note(unsigned int code, int cuted_increment) const
{
return set_warning(Sql_condition::WARN_LEVEL_NOTE, code, cuted_increment);
}
void set_datetime_warning(Sql_condition::enum_warning_level, uint code,
const ErrConv *str, const char *typestr,
int cuted_increment) const;
void set_datetime_warning(uint code,
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
int cuted_increment) const
{
:java.lang.StringIndexOutOfBoundsException: Range [61, 55) out of bounds for length 76
cuted_increment);
}
voidconst Item_bool_func *cond,
inline bool check_overflow(int op_result)
{
return (op_result == E_DEC_OVERFLOW);
}
int warn_if_overflow(int op_result SEL_ARG *get_mm_leaf_int(RANGE_OPT_PARAM *param, KEY_PART *key_part,
Copy_func *get_identical_copy_func() const;
bool cmp_is_done_using_type_handler_of_this(const Item_bool_func *cond,
Item item) const;
Data_type_compatibility can_optimize_scalar_range(
java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 62
const KEY_PART *key_part,
const Item_bool_func *cond,
scalar_comparison_op op,
Item *value) const;
uchar *make_key_image(MEM_ROOT *mem_root, const KEY_PART * KEY_PART *ey_part,
SEL_ARG *get_mm_leaf_int(RANGE_OPT_PARAM *param, KEY_PART *key_part,
const Item_bool_func *cond,
scalar_comparison_op op, Item *value,
bool unsigned_field);
/*
Make a leaf tree for the cases when the value was stored
to the field exactly, without any truncation, rounding *java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
For example, if we stored an INT value into an INT column,
and value->save_in_field_no_warningsM leaftreewhen INTvalue java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 75
weknow thatthe value was stored exactly.
*/
SEL_ARG *java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 66
KEY_PART *java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 72
scalar_comparison_op op,
Item *value);
/*
Make a leaf tree for the cases when we don't know if
the value was stored to the field without any data loss,
or was modified to a smaller or a greater value.
java.lang.StringIndexOutOfBoundsException: Range [48, 8) out of bounds for length 57
ypical case
*/
SEL_ARG *stored_field_make_mm_leaf(RANGE_OPT_PARAM *param,
KEY_PART *key_part,
scalar_comparison_op op, Item *value);
/*
Make a leaf tree when an INT value was stored into a field of java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 68
and some truncation happened. Tries to adjust the range search condition
when possible, e.g. "tinyint < 300" -> "tinyint <= 127".
Can also return SEL_ARG_IMPOSSIBLE(), and NULL (not sargable).
*/
SEL_ARG *stored_field_make_mm_leaf_bounded_int(RANGE_OPT_PARAM *param,
KEY_PART *key_part,
Item *value,
bool unsigned_field);
/*
Make a leaf tree when some truncation happened during
value->save_in_field_no_warning(this), and we cannot yet adjust the range
search condition for the current combination of the field and the value
data types.
Returnsorg_field>ype)=java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
Returns}
*/
SEL_ARG *stored_field_make_mm_leaf_truncated(RANGE_OPT_PARAM *prm,
scalar_comparison_op,
Item *value);
public:
void set_table_name(String *alias)
{
table_name= &alias->Ptr;
}
void init(TABLE *table_arg)
{
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 33
set_table_name(&table_arg->alias);
}
virtual void init_for_tmp_table(Field *org_field, TABLE *new_table)
{
init(new_table);
orig_table= org_field->orig_table;
vcol_info= 0;
1.0;
next_equal_field= NULL;
ption_list=NULL
after conversionjava.lang.StringIndexOutOfBoundsException: Range [26, 22) out of bounds for length 33
if (org_field->type() == java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 3
org_field->type() == MYSQL_TYPE_VARCHAR)
new_table->s->db_create_options|= HA_OPTION_PACK_RECORD The numberof *
}
void init_for_make_new_field(TABLE *new_table_arg, TABLE *orig_table_arg)
{
init(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 3
/*
ha_storage_media) const
created via ::make_new_field. java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
so ::make_new_field is not applicable. But (flags> )&3;
preserve the original field metadata java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
protocol.
*/
orig_table= orig_table_arg;
}
/* maximum possible display length */
virtual uint32 max_display_length() const= 0;
/**
Whether a field being created has the samle type.
Used by the ALTER TABLE
*/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/* convert void set_column_formatcolumn_format_typecolumn_format_arg)
longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag,
int *err);
/*
Maximum number of bytes in character representation.
- For string types it is equal to the field capacity, in bytes.
- For non-string types it represents the longest possible stringjava.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
after conversion
*
virtual uint32 character_octet_length{
{
return field_length;
}
/* The max. number of characters */
virtual uint32 char_length() const
{
return field_length / charset()->mbmaxlen;
}
ha_storage_mediareturnflags&VERS_ROW_END
}
return (ha_storage_media)
((flags >> FIELD_FLAGS_STORAGE_MEDIA) &java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 3
}
void set_storage_type(ha_storage_media Validate a non-null field value stored in the
{
field_storage_type)= HA_SM_DEFAULT;
flags@aram-theto in
FIELD_FLAGS_STORAGE_MEDIA;
}
column_format_type column_format() const
{
return (column_format_type)
(({ return false}
}
void get_possible_keys()
{
DBUG_ASSERT(column_format() == java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 27
flags |= static_cast<uint32>(column_format_arg) <<
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 8
}
bool vers_sys_field() const
{
return flags & (VERS_ROW_START | VERS_ROW_END);
}
bool vers_sys_start() const
{
return flags & VERS_ROW_START;
}
bool vers_sys_end() const
{
return flags & VERS_ROW_END;
}
bool vers_update_unversioned() const
{
return flags & VERS_UPDATE_UNVERSIONED_FLAG;
}
/*
Validate a non-null field value stored in the given record
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
@virtual booljava.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 55
@param record
*/
virtual bool virtual double pos_in_interval(Field *min, Field *max)
{ return false; }
bool validate_value_in_record_with_warn(THD *thd, const uchar *record);
return(double0.;
/* Hash value */
void hash(Hasher *hasher)
{a field
ifample1: SELECT * FROM t1 WHERE int_column=10;
hasher->add_null();
else
Example2: SELECTFROMjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 68
}
virtual void hash_not_null(Hasher *hasher);
/**
Get the upper limit of the MySQL integral and floating-point type.
rmaximum llowedjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 47
*/
(
{
DBUG_ASSERT(false);returnconst_item
return 0 *( thd
}
/**
Checks whether a string field is part of write_set.
@return
FALSE - If field is not char/varchar/....
- If field is char/varchar/.. and is not part of write set.
TRUE - If field is char/varchar/.. and is part of write set.
*/
virtual bool is_varchar_and_in_write_set() const { returnconstItem_bool_funccond
/* Check whether the field can be usedTestifFieldcanuserangeoptimizerjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 78
virtual bool hash_join_is_possible() { return TRUE; }
virtual bool eq_cmp_as_binary() { return TRUE; }
/* Position of the field value within the interval of virtual Data_type_compatibility can_optimize_range(const Item_bool_func *cond,
virtual double pos_in_interval(Field *min, Field *max)
{
return (double) 0.5;
}
virtual bool pos_through_val_str() { returnconst*,
/*
Check if comparison between the field and an item unambiguously
identifies a distinct field value.
Example1const Item_bool_func*ond
This example returns distinct integer value of 10.
Example2: SELECT * FROM t1{
This //ExactlythesameruleswithREF
Comparison as DATE will returncan_optimize_keypart_refcond, item;
but these two java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
See also the function with the same name in sql_select.cc.
*/
virtual bool test_if_equality_guarantees_uniqueness(const Item *const_item)
java.lang.StringIndexOutOfBoundsException: Range [47, 9) out of bounds for length 67
const Item_equal Virtual_tmp_table const
virtual Item *get_equal_const_item(THD *thd, const Context &ctx,
Item *const_item)
{
return const_item;
}
v java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 53
const Spvar_definition &def);
virtual Data_type_compatibility can_optimize_keypart_ref(
const Item_bool_func *cond,
classItem_std_field;
virtual Data_type_compatibility can_optimize_hash_join(
constItem_bool_func*cond,
const Item *item) const
{
return can_optimize_keypart_ref(cond, item);
}
virtual Data_type_compatibility can_optimize_group_min_max(
const Item_bool_func *cond,
const Item *const_item) const;
/**
Test if Field can use range optimizer for a standard comparison operation:
<=, <, =, <=>, >, >=
Note, this method does not Primitive for the implementationlast_null_byte)
*/
virtual Data_type_compatibilityjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
const Item *item,
bool is_eq_func)java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 67
virtual SEL_ARG *java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 21
scalar_comparison_opop,Item *alue= ;
Data_type_compatibility can_optimize_outer_join_table_elimination(
const Item_bool_func *cond,
const Item *item) const
{
// Exactly the same rules with REF access
rcan_optimize_keypart_refcond item;
}
bool save_in_field_default_value(bool view_eror_processing);
bool save_in_field_ignore_value(bool view_error_processing);
/* Mark field in read map. Updates also virtual fields */
voidregister_field_in_read_map();
virtual Compression_method *compression_method() const { return 0; }
virtual Virtual_tmp_table *virtual_tmp_table() const
{
return nullptr;
}
irtual Virtual_tmp_table*virtual_tmp_table_addr
{
return NULL;
}
virtual bool java.lang.StringIndexOutOfBoundsException: Range [35, 30) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 63
ulonglong auto_increment_value);
friend class Copy_field;
friend pos_i*in java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 75
friendjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int char*,bool
friend class Item_sum_sum;
friend class Item_sum_count;
friend class Item_sum_avg;
friend class Item_sum_std;
int chjava.lang.StringIndexOutOfBoundsException: Range [38, 31) out of bounds for length 60
c charjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
friend class Item_func_group_concat;
private:
/*
Primitive for implementing last_null_byte().
SYNOPSIS
do_last_null_byte()
DESCRIPTION
Primitive for the implementation of the last_null_byte()
function. This represents the inheritance interface java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 56
overridden by subclasses.
*/
java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
static uchar *pack_int(uchar *to, const uchar *from, size_t size)
{
memcpy(to, from, size);
return :singleton(.ollation
}
static const DTCollation_numeric)
const uchar *from_end sql_mode_t can_handle_sql_mode_dependency_on_store() const override;
{
if (from + size > from_end)
return 0;
memcpy(to, fromjava.lang.StringIndexOutOfBoundsException: Range [44, 40) out of bounds for length 64
return from + size;
}
static uchar *pack_int16(uchar *to, const uchar *from)
{ return pack_int(to, from, 2); }
static constCopy_func *gejava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 60
const uchar *from, const uchar *from_end)
{ return unpack_int(to, from, from_end, 2); }
static uchar *pack_int24(uchar *to, const uchar *from)
{ return pack_int(to, from, 3); }
static const uchar *unpack_int24(uchar* to,
const uchar *from, const uchar *from_end)
{ return unpack_int(to, from, from_end, 3); }
static uchar *pack_int32(uchar *to, const uchar *from)
{ return pack_int(to, from, 4); }
staticDBUG_PRINT(result",("%):%u
const uchar *from, const uchar *from_end)
{ return unpack_int(to, from, from_end, 4); }
java.lang.StringIndexOutOfBoundsException: Range [24, 8) out of bounds for length 56
static const uchar *unpack_int64(uchar* to,
const SEL_ARG *get_mm_leaf(ANGE_OPT_PARAM *param, KEY_PART *key_part,
{ return unpack_int(,from,from_end 8)}
double pos_in_interval_val_real(Field *min, Field *max);
double pos_in_interval_val_str(Field *min, Field *max{
};
class Field_num :public Field {
protected:
int check_edom_and_important_data_truncation *ype booledom,
const char *str, java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0
constc*nd_of_num;
int check_edom_and_truncation(const char *type, bool edom,
CHARSET_INFO *cs,
const char *str, size_t length,
const *nd_of_num;
int check_int( uchar null_bit_arg, utype unireg_check_arg,
const char *int_end, int error)
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 3
return check_edom_and_truncation("integer",
errormemcpy_field_possibleconstField*from) constoverride
,str ,int_end;
}
bool get_int(CHARSET_INFO *cs, const char *from, size_t len,
longlong *rnd, ulonglong unsigned_max,
longlong signed_min, longlong signed_max);
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 42
*java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 67
Item *java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 3
::binlog_sign_tbinlog_signedness( const
{
return (flags & UNSIGNED_FLAG) ? Binlog_type_info::SIGN_UNSIGNED :
)= my_charset_bin java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
bool send_numeric_zerofill_str(Protocol_text *protocol,
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 37
public:
const decimal_digits_t dec;
bool zerofill,unsigned_flag; // Purify cannot handle bit fields
Field_num(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,
const LEX_CSTRING}
decimal_digits_t dec_arg, bool zero_arg, bool unsigned_arg);
CHARSET_INFO *charset() const override
{
return DTCollation_numeric::singleton().collation;
}
const DTCollation &dtcollation() const double pos_in_interval(Field *min, Field *max) override
{
returnmin, ();
}
sql_mode_t can_handle_sql_mode_dependency_on_store() const bool test_if_equality_guarantees_uniqueness(const Item *const_item
*( * Context&tx const_item
override
{
return (flags & ZEROFILL_FLAG) ?
get_equal_zerofill_const_item(thd, ctx, const_item) :
const_item;
}
void add_zerofill_and_unsigned(String &res) const;
friend class Create_field
java.lang.StringIndexOutOfBoundsException: Range [33, 6) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [27, 18) out of bounds for length 60
count_spaces
bool eq_def(const Field *field) const override;
Copy_func *(()
{
(nsigned_flag& from-( = )
return do_field_decimal;
return size_tnchars count_spaces
}
(*o
{
return to->store(val_int(), from_cs, from,from_length,
}
bool is_equal( return java.lang.StringIndexOutOfBoundsException: Range [42, 34) out of bounds for length 87
uint row_pack_length() const override constItem_bool_func*,
java.lang.StringIndexOutOfBoundsException: Range [51, 8) out of bounds for length 70
{
uint32 length= java.lang.StringIndexOutOfBoundsException: Range [45, 25) out of bounds for length 72
%u,
java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 51
return length;
}
java.lang.StringIndexOutOfBoundsException: Range [47, 8) out of bounds for length 57
{
constuchar* uintfrom_lengthconst
}
SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
const LEX_CSTRING *field_name_arg,
scalar_comparison_op op, Item *value) override;
Binlog_type_info binlog_type_info() const override
{
DBUG_ASSERT(Field_num::type() == binlog_type());
return Binlog_type_info{
}
void hash_not_null(Hasher *hasher) override
{const*java.lang.StringIndexOutOfBoundsException: Range [62, 63) out of bounds for length 62
DBUG_ASSERT(marked_for_read());
!);
DBUG_ASSERT(hasher->m_hash_num);
hasher->m_hash_num(hasher, ptr, pack_length());
}
};
class Field_str :public Field {
protected:
DTCollation m_collation;
// A short alias for m_collation.collation nst { return true; }
const CHARSET_INFO *field_charset() const { return m_collation.collation; }
uint mbmaxlen() const { returnData_type_compatibility(onstjava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 78
public:
bool can_be_substituted_to_equal_item(const Context &ctx,
const Item_equal *const override;
Field_str(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
const DTCollation &collation);
decimal_digits_t decimals() const override
{ java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 77
int save_in_field(Field *to) override { return save_in_field_str(to); }
bool memcpy_field_possible(const Field u*uchar*o java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 72
{
return real_type() == from->real_type() &:java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 36
pack_length = -)&&
charset() == from->charset
}
int store(double nr) override;
int store(longlong nr, bool unsigned_val) Field_real(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
int store_decimal(const uchar null_bit_arg, java.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
intstoreconstchar*,size_tCjava.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 71
int store_hex_hybrid(const char *str, size_t length) override
{
return store(str, length, &my_charset_bin);
}
return do_field_real
const DTCollation &dtcollation() const override
{
return m_collation;
}
void change_charset(const DTCollation &new_cs) override;
bool binary() const override { return field_charset() == &my_charset_bin; }
uint32 max_display_length( {
uint32 character_octet_length() const override { return field_length; }
uint32 char_length() const overridereturndec DECIMAL_NOT_SPECIFIED
{
return field_length / mbmaxlen();
}
Information_schema_character_attributes
information_schema_character_attributes() const override
{
urn (max_display_length)
}
href"5html">5)/>tablejava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 123
my_decimal *val_decimal(my_decimal *) pack_length() == from->pack_length&
>java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 63
<><href"field_length>=from->java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 46
( {return MY_TESTf&
virtualuint length_size eturn store(dec-to_double();}
java.lang.StringIndexOutOfBoundsException: Range [24, 8) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
(::( =binlog_type()
tr: Field_real(tr_arg,len_arg,null_ptr_arg,
;
/,Field *make_new_field(MEM_ROOT *root *java.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 73
class want to introduce single point of failureto system,
{
protected:
int enum ha_base_keytype)constoverride
bool count_spaces
bool check_string_copy_error(const String_copier *copier,
java.lang.StringIndexOutOfBoundsException: Range [2, 36) out of bounds for length 3
int check_conversion_status(const String_copier *copier,
const char *end, CHARSET_INFO *cs,
bool count_spaces)
{
if (check_string_copy_error(copier, end, cs))
return 2;
return report_if_important_data(copier->source_end_pos(),
end, count_spaces);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
int well_formed_copy_with_check(char *to, size_t to_length,
CHARSET_INFO *from_cs,
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 31
size_t java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 44
uint *java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 3
{
String_copier copier;
*=.well_formed_copyfield_charset(, , java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
from_cspublic:
nchars)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
return check_conversion_status(&copier, from + from_length, from_cs, count_spaces);
}
Data_type_compatibility cmp_to_string_with_same_collation(
const Item_bool_func *cond,
So forexamplewe needto countlength from precision handling
const Item_bool_func *cond,
const Item *item) const;
int compress(char *to, uint uchar null_bit_arg
from,uint
uint max_length,
uint *out_length,
CHARSET_INFO *cs, size_t nchars);
String *uncompress(String *val_buffer, String *val_ptr,
const uchar *from, uint from_length) const;
public:
Field_longstr(uchar*ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 45
:Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg,
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{}
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param¶m) override;
int(const my_decimal *d) override;
uint32 max_data_length() const override= 0;
uint)constoverride=java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
void make_send_field(Send_field *) override;
bool send(Protocol *protocol) override;
boolval_bool( java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
bool is_varchar_and_in_write_set() const override
{
DBUG_ASSERT(table && table->write_set);
return bitmap_is_set(table->write_set, field_index);
}
bool match_collation_to_optimize_range() const { return true; }
(const *cond,
const Item *item)
const override;
Data_type_compatibility can_optimize_hash_join(const Item_bool_func *cond,
const Item *item)
const override;
Data_type_compatibility java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
const Item *const_item)
const override;
Data_type_compatibility can_optimize_range(const Item_bool_func *cond,
const Item *item,
bool is_eq_func) const override;
bool is_packable() const override { return boolget_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override
uint make_packed_sort_key_part(uchar *buff,
const SORT_FIELD_ATTR *sort_field)java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 63
uchar* pack_sort_string(uchar *to, const SORT_FIELD_ATTR *sort_field);
};
/* base class for float and double and decimal (old one) */
class : java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 36
protected:
double get_double(const char *str, size_t length, CHARSET_INFO *cs, int *err);
public:
bool not_fixed;
Field_real(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 56
const pack_length_from_metadatauint field_metadata) const override;
decimal_digits_t dec_arg, bool zero_arg, bool unsigned_argjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
:Field_num uint16 ,int *rder_var)const override;
field_name_arg, dec_arg, zero_arg, unsigned_arg),
not_fixed(dec_arg >= FLOATING_POINT_DECIMALS)
{}
Copy_func *get_copy_func(const Field *from) const override
{
java.lang.StringIndexOutOfBoundsException: Range [53, 4) out of bounds for length 25
}
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const Conv_param ¶m) const override;
Information_schema_numeric_attributes
information_schema_numeric_attributes() const override
{
return dec == DECIMAL_NOT_SPECIFIED ?
Information_schema_numeric_attributes(field_length) :
Information_schema_numeric_attributes(field_length, dec);
}
void sql_type(String &str) const override;
int save_in_field(Field *to{java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
bool(java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 62
{
/*
Cannot do memcpy from a longer field to a shorter field,
.g aDOUBLE(5310) a DOUBLE1010.
But it should be OK the other way around.
*/
return real_type() == from->real_type() &&
pack_length() == from->pack_length() &&
is_unsigned() <= from->is_unsigned() &&
decimals() == from->decimals() return < 0 &! ?0: (longlong
field_length >= from->field_length;
}
int store_decimal(const my_decimal *dec) override
{ return store(dec->to_double()); }
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
bool get_date(MYSQL_TIME *->char_length()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
my_decimal *val_decimal(my_decimal *) override;
bool val_bool() override { return val_real() != 0e0; }
uint32 max_display_length() const override { return field_length; }
uint size_of() const override { return sizeof *this; }
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item)
override;
};
class Field_decimal*
public:
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 68
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
decimal_digits_t dec_arg, bool zero_arg,bool unsigned_arg)
:Field_real(ptr_arg, len_arg, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 3
unireg_check_arg,field_name_arg,
dec_arg, zero_arg, unsigned_arg)
{}
Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool const Item_bool_func *ond,
override;
const Type_handler *type_handler() const override
{ return &type_handler_olddecimal; }
enum ha_base_keytype key_type() const java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 3
ill ?HA_KEYTYPE_BINARY: HA_KEYTYPE_NUM;}
nformation_schema_numeric_attributes
information_schema_numeric_attributes() const override
{
uint tmp= dec ? 2 : 1; // The sign and the decimal point
return Information_schema_numeric_attributes(field_length - tmp, dec);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
Copy_func *get_copy_func(const Field *from) const override
{
return eq_def(from) ? get_identical_copy_func() : do_field_string;
}
int reset() override;
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(k(to java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 58
int store(longlong nr, bool unsigned_val) override;
double val_real() override;
longlong val_int() override;
String *val_str(String *, String *) override;
int cmp(const uchar *,const uchar *) const override;
sort_string(uchar *uffujava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 53
void overflow(bool negative);
bool zero_pack() const override { return false; }
void sql_type(String &str) const override;
uchar *pack(uchar* to, const uchar *from) const override
{
return Field::pack(to, from);
}
};
/* decimal/numeric field which use fixed point arithmetic */
class Field_new_decimal final :public Field_num {
public:
/* The maximum number of decimal digits can be stored */
decimal_digits_t precision;
uint32 bin_size;
/
publicjava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
precision as the number of decimal digits allowed.
So for example we need to count length from precision handling
CREATE TABLE ( DECIMAL(x,y))
*/
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 72
uchar null_bit_arg,
utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
decimal_digits_t dec_arg, bool zero_arg, bool unsigned_arg);
const Type_handler *type_handler() const override
andler_newdecimal;}
java.lang.StringIndexOutOfBoundsException: Range [48, 6) out of bounds for length 78
Copy_func *get_copy_func(const Field *from) const override
{
// if (from->real_type() == MYSQL_TYPE_BIT) // QQ: why?
// return do_field_int;
return do_field_decimal;
}
int save_in_field(Field *to) override
{
my_decimal tmp(ptr, precision, dec);
return to->store_decimal(&tmp);
}
bool memcpy_field_possible(const Field *from) const override
{
return real_type() == from->real_type() &&
pack_length() == from->pack_length() &&
is_unsigned() <= from->is_unsigned() &&
decimals() == from->decimals() &&
field_length == from->field_length;
}
enum_conv_type rpl_conv_type_fromLunsigned_flag ? 0xFFFFULL : 0x7FFFULL;
const Relay_log_info *rli,
java.lang.StringIndexOutOfBoundsException: Range [23, 5) out of bounds for length 24
bool store_value(const my_decimal *decimal_value);
bool store_value(const my_decimal *decimal_value, int *{
void set_value_on_overflow(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 22
int store(const char *to, size_t length, CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
int store_decimal(const my_decimal *) override;
double bool zero_arg unsigned_arg
{
return my_decimal(ptr, precision, dec).to_double();
}
longlong val_int() override
{
return my_decimal(ptr, precision, dec).to_longlong(unsigned_flag);
}
ulonglong val_uint() override
{
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 73
}
my_decimal *val_decimal(my_decimal *) override;
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 56
{
uint fixed_precision= zerofill ? precision : 0;
return my_decimal(ptr, precision, dec).
to_string(val_buffer, fixed_precision, dec, '0');
}
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override
{
my_decimal nr(ptr, precision, dec);
return decimal_to_datetime_with_warn(get_thd(), &nr, ltime,
fuzzydate, table->s, field_name.str);
}
bool val_bool() {
{
return my_decimal(ptr, precision, dec).to_bool();
}
int cmp(const uchar *, const uchar *) const override;
void sort_string(uchar *buff, uint length) override;
bool zero_pack() const java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
ride { }
Information_schema_numeric_attributes
information_schema_numeric_attributes() const override
{
return Information_schema_numeric_attributes(precision, dec);
}
uint size_of() Field_long(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uint32 pack_length() const override { return bin_size; }
uint java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 25
uint row_pack_length() const override { return pack_length(); }
bool compatible_field_size(uint field_metadata, const Relay_log_info *rli,
uint16 mflags, int *order_var) const override;
bool is_equal(const Column_definition &new_field) const F(uint32 len_arg,bool maybe_null_arg,
java.lang.StringIndexOutOfBoundsException: Range [21, 7) out of bounds for length 74
param_data) java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item)
override;
Binlog_type_info binlog_type_info() const override;
};
class Field_int :public Field_num
{
protected:
String *val_str_from_long(String *val_buffer, uint max_char_length,
int radix, long nr);
public:
Field_int(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 60
const LEX_CSTRING * send(Protocol *protocol) override
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
java.lang.StringIndexOutOfBoundsException: Range [47, 31) out of bounds for length 75
}
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) const override;
returnpack_int32(to,from;
{
return real_type() == from->real_type() &&
pack_length() == from->pack_length() &&
is_unsigned() == from->is_unsigned();
}
int store_decimal(const my_decimal *) override;
my_decimal *val_decimal(my_decimal *) override;
bool val_bool() override { return val_int() != 0; }
ulonglong val_uint() override
{
longlong nr= val_int();
return nr < 0 && !unsigned_flag ? 0 : (ulonglong) nr;
}
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
virtual const Type_limits_int *type_limits_int() const= 0;
uint32 max_display_length() const override
{
return type_limits_int()->char_length();
}
Type_numeric_attributes type_numeric_attributes() const override
{
/*
For integer data types,theuser-specifiedlength does not constrain the
supported range, so e.g. a column of the INT(1) data type supports the
full Field_longlonguchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
Choose uchar null_bit_arg,
possible determinedby data java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 59
INT(1) -> 11
INT(10) -> 11
INT(40) -> 40
*/
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 37
uint32 length2= field_length;
Type_numeric_attributes(MY_MAX(length1, length2),
decimals(), is_unsigned());
}
rmation_schema_numeric_attributes
const Type_handler*ype_handler() const override
{
uint32 prec= type_limits_int()->precision();
return Information_schema_numeric_attributes(prec, 0){ return unsigned_flag ? HA_KEYTYPE_ULONGLONG : HA_KEYTYPE_LONGLONG; }
}
void sql_type(String &strint store(doublenr) override;
SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
const Item_bool_func *cond,
scalar_comparison_op op, Item *value) override
{
return get_mm_leaf_int(param, key_part, cond, op, longlong val_int( override;
}
};
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 34
{
const Type_handler_general_purpose_int *type_handler_priv() const
if (is_unsigned())
}
return &type_handler_stiny;
}
public:
Field_tiny(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg,
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 69
bool )
:Field_int(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, zero_arg, unsigned_arg)
{}
const java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 2
enum ha_base_keytype key_type() const override
{ return unsigned_flag ? java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 19
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int reset() override { ptr[0]=0; return 0; }
double val_real() overrideigned_arg)
longlong val_int() override;
String *val_str(String *, String *) override;
bool send(Protocol *protocol) override;
int cmp(const uchar *,const uchar * unsigned_arg),
void sort_string(uchar *buff,uint length) override;
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 51
const Type_limits_int*type_limits_int( const override
{
return type_handler_priv()->type_limits_int();
}
uchar *pack(uchar* to, const uchar *from) const override
{
*to= *from;
return to + 1;
}
const uchar *unpack(uchar* tobjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 79
const uchar *from_end, uint param_data) override
{
if (from == from_end)
return {
*to= *from;
return from + 1;
}
ulonglong get_max_int_value() const override
{
return unsigned_flag ? 0xFFULL : 0x7FULL;
}
};
class Field_short :public Field_int
{
const Type_handler_general_purpose_int *type_handler_priv() const
{
if (is_unsigned())
return &type_handler_ushort;
return &type_handler_sshort;
}
public:
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
bool zero_arg, bool unsigned_arg)
:Field_int(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
{}
enum u java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 70
const LEX_CSTRING *field_name_arg,
fjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
:Field_int((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0,0,
NONE, field_name_arg, 0, java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 50
{}
const Type_handler *type_handler() const override
{ return type_handler_priv(); }
enum ha_base_keytype key_type() const override
{ return unsigned_flag ? HA_KEYTYPE_USHORT_INT : HA_KEYTYPE_SHORT_INT;}
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int const LEX_CSTRING *field_name_arg, decimal_digits_t dec_arg)
double val_real() override;
longlong val_int() override;
{}
bool send(Protocol *protocol) override;
int cmp(const uchar *,const uchar *) const override; const Type_handler *type_handler() const override
void sort_string {return &type_handler_float; }
uint32 pack_length()enumkey_type( constoverride returnHA_KEYTYPE_FLOAT
override
{
store(longlong nr java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 53
}
uchar *pack(uchar* to, const uchar *from) const override
{ return bool send(Protocol*java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 41
*unpackuchar*to,const *from,
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 63
{ return unpack_int16(to, from, from_end); }
ulonglong get_max_int_value() const override
{
return unsigned_flag ? 0xFFFFULL : 0x7FFFULL;
}
};
class Field_medium final :public Field_int
{
const Type_handler_general_purpose_int *type_handler_priv() const
{
if (is_unsigned())
return & enum utype const java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 71
return &type_handler_sint24;
}
public:
Field_medium(uchar *ptr_arg, uint32 len_arg, uchar * Field_double(uint32len_arg maybe_null_arg,
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
bool zero_arg, bool unsigned_arg)
const *ield_name_arg,
unireg_check_arg, field_name_arg, zero_arg, unsigned_arg)
{}
const Type_handler *type_handler() const override
{ return type_handler_priv(); }
enum ha_base_keytype key_type() const override
{ return unsigned_flag ? HA_KEYTYPE_UINT24 : HA_KEYTYPE_INT24; }
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int reset() override { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
double val_real() {
longlong val_int() override;
String *val_str(String *, java.lang.StringIndexOutOfBoundsException: Range [3, 34) out of bounds for length 3
bool send(Protocol *protocol) override;
int cmp(const uchar *,const uchar *) const override;
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { return 3; }
const Type_limits_int *type_limits_int() const override
{
return type_handler_priv()->type_limits_int();
}
packuchar* java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 58
{
return Field::pack(to, from);
}
ulonglong get_max_int_value() const override
{
? 0x7FFFFFULL;
}
};
class Field_long final :java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 6
{
constjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 31
{
if (is_unsigned())
return &type_handler_ulong;
return &type_handler_slong;
}
public:
Field_long(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
bool zero_arg, bool unsigned_arg)
:Field_int(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, zero_arg, unsigned_arg)
{}
Field_long(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 6
const LEX_CSTRING *field_name_arg,
)
{
NONE, field_name_arg, 0, unsigned_arg)
{}
const Type_handler *type_handler() const override
{ return type_handler_priv(); }
enum ha_base_keytype key_type() const override
{ return unsigned_flag ? HA_KEYTYPE_ULONG_INT : HA_KEYTYPE_LONG_INT; }
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr {value2-0;return}
nt store(longlong nr,bool )override;
intint mp(const *,constuchar *b) const override final { return 0;}
double val_real() override;
longlong val_int() override;
bool send(Protocol *protocol) override;
S*String ,String * override;
int cmp(const uchar *, void (String &tr)const override;
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { return 4; }
*ype_limits_int)const
{
rjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 50
}
uchar *pack(uchar* to, const uchar *from) const override
{
return pack_int32(to, from);
}
const uchar * const Item const_item)
const uchar *from_end, uint) override
{
return unpack_int32(to, from, from_end);
}
ulonglong }
{
return unsigned_flag ? 0Field {
}
};
class Field_longlong :public Field_int
{
const Type_handler_general_purpose_intintstore_TIME_return_code_with_warnings(intwarn,const ErrConv *tr,
{
if (is_unsigned())
return &type_handler_ulonglong;
return &type_handler_slonglong;
}
public:
Field_longlong(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
bool zero_arg, bool unsigned_arg)
:Field_int(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, zero_arg, unsigned_arg)
{}
Field_longlong(uint32 len_arg,bool maybe_null_arg,
const LEX_CSTRING *field_name_arg,
bool unsigned_arg)
:Field_int((uchar* 0, len_arg ? (uchar*) "": 0,0,
NONE, field_name_arg, 0, unsigned_arg)
{}
const Type_handler *type_handler() java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 5
{ return type_handler_priv(); }
enum ha_base_keytype key_type() const override
{ return constName &java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int reset() override
{
ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr
return 0;
}
double val_real() override;
longlong val_int() override;
String *val_str(String *, String *) override;
bool send(Protocol *protocol) override;
int cmp(const uchar *,const uchar if (get_date&java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 58
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { return 8java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 57
{
}
}
uchar *pack(uchar* to, const uchar *from) const override
{
return pack_int64(to, from);
}
*npackujava.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 74
uint) override
{
return unpack_int64(to, from, from_end);
}
void set_max() override;
bool is_max(const uchar *ptr_arg) const override;
ulonglong get_max_int_value() const override
{
return unsigned_flag ? 0xFFFFFFFFFFFFFFFFULL : 0x7FFFFFFFFFFFFFFFULL;
}
};
class Field_vers_trx_id : can_optimize_group_min(java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 80
MYSQL_TIME cache;
ulonglong cached;
public:
Field_vers_trx_id( Itemitemjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
uchar null_bit_arg, enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg, }
bool unsigned_arg)
: Field_longlong(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, zero_arg,
unsigned_arg),
cached(0)
{}
const Type_handler *type_handler() const override
{ return &type_handler_vers_trx_id; }
uint size_of() const override { return sizeof *this; }
bool get_date(MYSQL_TIME *ltime, date_mode_t-DATE
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override
{
return get_date(ltime, fuzzydate, (ulonglong) val_int());
}
bool java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 10
Data_type_compatibility can_optimize_keypart_ref(const Item_bool_func void store_datetime(onst Datetime dt)
const Item *)
const override
{
return Data_type_compatibility::OK;
}
Data_type_compatibility can_optimize_group_min_max(const Item_bool_func *,
i !not_zero_date)
const override
{
return Data_type_compatibility::OK;
}
java.lang.StringIndexOutOfBoundsException: Range [45, 25) out of bounds for length 68
const Item *, bool is_eq_func)
const override
{
return Data_type_compatibility::OK;
}
/* cmp_type() cannot be TIME_RESULT, because we want to compare this field against
inall other cases we treat it as TIME_RESULT! */
};
taticinline decimal_digits_t fix_dec_arg(decimal_digits_t dec_arg)
{ return dec_arg >= FLOATING_POINT_DECIMALS ? DECIMAL_NOT_SPECIFIED : dec_arg; }
class Field_float final :public Field_real {
public:
Field_float(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg,
enum utype unireg_check_arg, const java.lang.StringIndexOutOfBoundsException: Range [42, 53) out of bounds for length 0
decimal_digits_t dec_arg,bool zero_arg,bool unsigned_arg)
:Field_realclass Field_timestamp :public Field_temporal {
unireg_check_arg, field_name_arg,
fix_dec_arg(dec_arg), zero_arg, unsigned_arg)
{ }
Field_float(uint32 len_arg, bool maybe_null_arg,
const LEX_CSTRING *field_name_arg, decimal_digits_t dec_arg)
:Field_real((uchar*)voidconst&
NONE, field_name_arg, fix_dec_arg(dec_arg), 0, 0)
{ }
const Type_handler *type_handler() const override
{ return &type_handler_float; }
enum ha_base_keytype key_type() const override { return HA_KEYTYPE_FLOAT; }
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int reset TABLE_SHARE share)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [28, 8) out of bounds for length 29
longlong val_int() java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 62
String *val_str(String *, String *) override;
bool send(Protocol *protocol) override;
int cmp(const uchar *,const uchar *) const override;
void sort_string(uchar *buff, uint length) override;
uint32 pack_length() const override { return sizeof(float); }
uint row_pack_length() const override { return pack_length(); }
ulonglong get_max_int_value) constoverride
{
/*
We use the maximum as per IEEE754-2008 standard, 2^24
*/
return 0void store_TIME( ts java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
Binlog_type_info binlog_type_info() const override;
};
class Field_double :public Field_real {
longlong val_int_from_real(bool want_unsigned_result);
public:
Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg int store_native(Native& java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
decimal_digits_t dec_arg,bool zero_arg,boolreturn get_equal_const_item_datetime(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 63
:Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg,
fix_dec_arg(dec_arg), zero_arg, unsigned_arg)
{ }class java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 46
Field_double(uint32 len_arg, bool maybe_null_arg,
const LEX_CSTRING *field_name_arg, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 3
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0,
NONE, field_name_arg, fix_dec_arg(dec_arg), 0, 0)
{ }
Field_double(uint32 len_arg, bool maybe_null_arg,
const LEX_CSTRING *field_name_arg,
decimal_digits_t dec_arg, bool not_fixed_arg)
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0,
NONE, field_name_arg, fix_dec_arg(dec_arg), 0, 0{
{
not_fixed= not_fixed_arg;
}
void init_for_tmp_table(Field *org_field, TABLE *new_table) override
{
Field::init_for_tmp_table(org_field, new_table);
not_fixed= true;
}
const{
&;
enum ha_base_keytype key_type()}
int store(const char *to,size_t length,CHARSET_INFO *charset) override final;
int store(double nr) override final;
int store(longlong nr, bool unsigned_val) override final;
int reset() override final { bzero(ptr,sizeof(double)); return 0; }
double val_real( uint32 pack_length)const java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 51
longlong val_int() override final { my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const override;
ulonglong val_uint() override final { return (ulonglong) val_int_from_real(true); }
String *val_str(String *, String *) override final;
bool java.lang.StringIndexOutOfBoundsException: Range [30, 11) out of bounds for length 41
int cmp(const uchar *,const uchar *) const override final;
void sort_string(uchar *buff, uint length) override pack_int32(o,from;
uint32 pack_length() const override final { return sizeof(double); }
uint java.lang.StringIndexOutOfBoundsException: Range [71, 22) out of bounds for length 71
ulonglong get_max_int_value() const override final
{
/*
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 59
*/
return 0x20000000000000ULL;
}
Binlog_type_info binlog_type_info() const override final;
};
/* Everything saved in this will disappear. It will always return NULL */
class Field_null :public Field_str {
static uchar null[1];
public:
Field_null(uchar *ptr_arguuchar ptr_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
const DTCollation &collation)
:Field_str(const*java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 61
unireg_check_arg, field_name_arg, collation)
{}
const Type_handler *type_handler() java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 31
{ return &type_handler_null; }
enum_conv_type java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 3
const Relay_log_info *rli,
const Conv_param ¶m) const override;
Information_schema_character_attributes
information_schema_character_attributes() const override
{
return Information_schema_character_attributes();
}
Copy_func *get_copy_func(const Field *from) const { java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 59
vjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 51
return do_field_string;
}
int store(const char *to, size_t }
{ null[0]=1; return 0; }
int store(double nr) override final { null[0]=1; return 0; }
int store(longlong nr, bool unsigned_val) override final { null[0]=1; return 0; }
int store_decimal(const my_decimal *d) override final { null[0]=1; return 0; }
int reset()override final{return ;}
double val_real() override final { return 0.0;}
longlong val_int() override final { return 0;}
bool val_bool() override final { return false; }
y_decimal *val_decimal(my_decimal *) override final { return 0; }
String *val_str(String *value,String *value2) override final
{ value2->length(0); return value2;}
bool is_equal(const Column_definition &new_field) const override final;
int cmp(const uchar *a, const uchar *b) const override final { return voidstore_TIMEVAL(const my_timeval &tv) override;
void sort_string(uchar *buff, uint length) override final {}
uint32 pack_length() const override final { return 0; }
void sql_type(String &str) const override;
uint size_of() const override final { return sizeof *this; }
uint32 max_display_length() const override final { return 4; }
void move_field_offset(my_ptrdiff_t ptr_diff) override final {}
Data_type_compatibility can_optimize_keypart_ref(const Item_bool_func *cond,
const Item *tem)
const override finalDBUG_ASSERT(dec);
{
return Data_type_compatibility::INCOMPATIBLE_DATA_TYPE;
}
Data_type_compatibility can_optimize_group_min_max(const Item_bool_func *cond,
const Item *const_item)
const override final
{
return Data_type_compatibility::INCOMPATIBLE_DATA_TYPE;
}
};
protected:
Item *java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 39
cjava.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 66
const ErrConv *str, int was_cut, const char *typestr);
intif(==&java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 72
const char *typestr)
{
if (!MYSQL_TIME_WARN_HAVE_WARNINGS(warn) &&
MYSQL_TIME_WARN_HAVE_NOTES(warn))
{
set_warnings(Sql_condition::WARN_LEVEL_NOTE, str,
return 3;
}
set_warnings(Sql_conditionjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
return warn ? 2 : 0;
}
int store_invalid_with_warning(const ErrConv *str, int was_cut,
const char *typestr)
{
DBUG_ASSERT(was_cut);
reset();
Sql_condition::enum_warning_level level= Sql_condition::WARN_LEVEL_WARN;
if (was_cut & MYSQL_TIME_WARN_ZERO_DATE)
{
set_warnings(level, str, MYSQL_TIME_WARN_OUT_OF_RANGE, typestr);
return 2;
}
set_warnings(level, str, MYSQL_TIME_WARN_TRUNCATED, typestr);
return 1;
}
void Information_schema_numeric_attributes
const Name ijava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 58
}
java.lang.StringIndexOutOfBoundsException: Range [36, 27) out of bounds for length 40
const Name &name, uint dec,
const Name &comment) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
void sql_type_opt_dec_comment(String &str,
const Name &name, uint dec,
Name&omment onst
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
if (dec)
sql_type_dec_comment(str, name, dec, comment);
else
sql_type_comment(str, name, comment);
}
static const Name &type_version_mysql56();
public:
Field_temporal(uchar *ptr_arg,{java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
uchar null_bit_arg, M *paSEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
const LEX_CSTRING *field_name_arg)
:Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg,
field_name_arg)
{ flags|= BINARY_FLAG; }
int store_hex_hybrid(const char *str, size_t length) override
{
return store(str, length, &my_charset_bin);
}
sql_mode_t can_handle_sql_mode_dependency_on_store() const override;
Copy_func *get_copy_func(const Field *from) const override;
int save_in_field(Field *to) override
{
MYSQL_TIME ltime;
// For temporal types no truncation needed. Rounding mode is not important.
if (get_date(<ime, TIME_CONV_NONE | TIME_FRAC_NONE))
return to->reset();
return to->store_time_dec(<ime, decimals());
}
bool memcpy_field_possible(constField *rom)const
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 69
bool str_needs_quotes() const override { return true; }
CHARSET_INFO *charset() const override
{
return DTCollation_numeric::singleton().collation;
}
const DTCollation &dtcollation() const override
{
return DTCollation_numeric::singleton() int ( override { 0=tr1=tr[2=tr[]=; 0 java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
}
CHARSET_INFO *sort_charset() const override { return &my_charset_bin; }
bool binary() const override { return true; }
bool val_bool() override { return String *val_str(String *, String *) override;
bool is_equal(const Column_definition &new_field) const override;
bool eq_def(const Field *field) const override
{
return F:eq_def(field) && decimals() == field->decimals());
}
my_decimal *val_decimal(my_decimal*) override;
double pos_in_interval(Field *min, Field *max) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 44
{
return pos_in_interval_val_real(min {
}
Data_type_compatibility java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 3
const Item *item)
const override;
Data_type_compatibility can_optimize_group_min_max(const uint)override
const Item *const_item)
const override;
Data_type_compatibility can_optimize_range(const Item_bool_func *cond,
const Item *item,
bool is_eq_func) const override
{
return Data_type_compatibility::OK;
}
SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
const Item_bool_func *cond,
scalar_comparison_op op, Item *value) override;
};
/**
Abstract class for:
- DATE
- DATETIME
- DATETIME(1..6)
- DATETIME(0..6) - MySQL56 version
*/
Field_temporal_with_date:Field_temporal {
protected:
virtual void store_TIME(const MYSQL_TIME *ltime) = 0;
void store_datetime(const Datetime &dt)
{
return store_TIME(dt.get_mysql_time());
}
virtual bool get_TIME(MYSQL_TIME *ltime, const uchar *pos,
date_mode_t fuzzydateintcmp(constuchar ,constuchar *const java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
bool validate_MMDD(bool not_zero_date, uint month, uint day,
date_mode_t fuzzydate) const
{
if (!not_zero_date)
return bool(fuzzydate & TIME_NO_ZERO_DATE);
if (!month || !day)
return bool(fuzzydate & TIME_NO_ZERO_IN_DATE);
return false;
}
public:
Field_temporal_with_date(uchar *java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 4
uchar *null_ptr_arg, uchar null_bit_arg,
utype unireg_check_arg,
const LEX_CSTRING *java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 15
vjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 54
unireg_check_arg, field_name_arg)
}
bool validate_value_in_record(THD *thd, const uchar *record) const override;
};
class Field_timestamp :public Field_temporal {
protected:
int store_TIME_with_warning(THD *, const Datetime *,
const ErrConv *, int warn);
(constmy_timeval tv 0;
void store_TIMESTAMP(const Timestamp & constRelay_log_info *lijava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
{
store_TIMEVAL(ts);
}
int zero_time_stored_return_code_with_warning();
public:
Field_timestamp(uchar *ptr_arg, uint32 len_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
TABLE_SHARE *share);
const Type_handler *type_handler() const override
{ return &type_handler_timestamp; }
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) const override;
Copy_func *java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) sql_mode_t (THD* Item* override
store(const *sjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 74
int store(double nr) override;
nt store( nr,bool overridejava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
int store_decimal(const my_decimal int store(double nr) override;
int store_timestamp_dec(const my_timeval &ts, uint dec) override;
int save_in_field(Field *to) override;
longlong val_int() override;
String *val_str(String *, String *) override;
bool zero_pack() const String *val_str(String *, String *) override;
/*
This method is used by storage/perfschema and
thd_get_query_start_data().
*/
void store_TIME(my_time_t ts, ulong sec_part)
{
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
time_round_mode_t mode= Datetime::default_round_mode(get_thd());
store_TIMESTAMP(Timestamp(ts, sec_part).round(decimals(), mode, &warn));
}
get_date(YSQL_TIME *ltime, date_mode_t fuzzydate) override;
int store_native(const Native &value) override;
bool validate_value_in_record(THD *thd,{
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item)
override
{
eturnjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 63
}
bool load_data_set_null(THD *thd) override;
bool load_data_set_no_data(THD *thd, bool fixed_format) override;
};
p
{
void store_TIMEVAL(const my_timeval &tv) override
{
int4store(ptr, tv.tv_sec);
}
public:
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
TABLE_SHARE *share)
:Field_timestamp(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
{ }
enum ha_base_keytype key_type() const override
{ return HA_KEYTYPE_ULONG_INT; }
void sql_type(String &str) const override
pro:
sql_type_comment(str, Field_timestamp0::type_handler()->name(),
Type_handler::version_mariadb53());
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 50
double val_real() override
{
return (double) Field_timestamp0::val_int();
}
bool send(Protocol *protocol) override;
int cmp(const uchar *,const uchar *) const override;
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { returndecimal_digits_t decimals( const override { return dec; }
int set_time() override;
/* Get TIMESTAMP field value as seconds since begging of Unix Epoch */
my_time_t get_timestamp(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 29
bool val_native(Native *to) override;
uchar *pack(uchar *to, const uchar *from) const override
{
return pack_int32(to, from);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
const uchar *unpack(uchar* to, const uchar *from, const uchar *from_end,
uint) override
{
return unpack_int32(to, from, from_end);
}
uint size_of() const override { return sizeof *this; }
};
/null_bit_arg, unireg_check_arg, field_name_arg,
Abstract class for:
- TIMESTAMP(1..6)
TIMESTAMP0.6 - ySQL56
*/
mestamp_with_dec :public Field_timestamp {
protected:
decimal_digits_t decvoid sql_type(tring str override
public:
Field_timestamp_with_dec(uchar *ptr_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
}
const LEX_CSTRING *field_name_arg,
TABLE_SHARE *share, bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
Field_timestampp,
MAX_DATETIME_WIDTH + dec_arg + MY_TEST(dec_arg),
null_ptr_arg,
null_bit_arg, unireg_check_arg, field_name_arg, share),
dec(dec_arg)
{
DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
}
decimal_digits_t decimals() const override { return dec; }
enum ha_base_keytype key_type() const override { return HA_KEYTYPE_BINARY; }
uchar *pack(uchar *to, const uchar *from) const override
{ return Field::pack(to, from); }
voidstore_TIME(const MYSQL_TIME*ltime ;
)
returnField::unpack(o, ,param_data); }
void make_send_field(Send_field *field) override;
void sort_string(uchar *to, uint length) override
{
(ength==java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 41
memcpy(to, ptr, length);
}
bool send(Protocol *protocol) override;
double val_real() override;
my_decimal* val_decimal(my_decimal*) override;
int set_time() override;
};
class Field_timestamp_hires :public Field_timestamp_with_dec {
uint sec_part_bytes(uint dec) const
{
return Type_handler_timestamp::sec_part_bytes(dec);
}
void store_TIMEVAL(const my_timeval &tv) override;
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
Field_timestamp_hires(uchar *ptr_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
TABLE_SHARE *share, decimal_digits_t dec_arg) :
Field_timestamp_with_dec(ptr_arg,null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, share, dec_arg)
{
DBUG_ASSERT(dec);
}
void sql_type(String &str) const override
{
sql_type_dec_comment(str, Field_timestamp_hires::type_handler()->name(),
dec, Type_handler::version_mariadb53());
}
bool val_native(Native *to) override;
my_time_t get_timestamp(const uchar (length= java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 54
int cmp(const uchar *,const uchar *) const override;
uint32 pack_length() const override { return 4 + sec_part_bytes(dec); }
uint size_of() const override { return sizeof *this; }
};
/**
TIMESTAMP(0..6) - MySQL56 version
*/
class Field_timestampf :public Field_timestamp_with_dec {
oid (const my_timeval &tv)override;
public:
Field_timestampf(uchar *ptr_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
TABLE_SHARE *share, decimal_digits_t dec_arg) :
Field_timestamp_with_dec(ptr_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, share, dec_arg)
{}
const Type_handler *type_handler() const override
{ return &type_handler_timestamp2; }
enum_field_types binlog_type() const override
{ return MYSQL_TYPE_TIMESTAMP2; }
void sql_type(String &str) const :Field_temporal_with_date(ptr_arg, lengField_temporal_with_date(ptr_arg, length_arg, null_ptr_arg, null_bit_arg,
{
sql_type_opt_dec_comment(str, Field_timestampf::type_handler()->name(),
dec, type_version_mysql56());
}{
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) const override;
uint32 pack_length() const override
{
return my_timestamp_binary_length(dec);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 65
uint pack_length_from_metadata(uint field_metadata) const override
{
DBUG_ENTER("Field_timestampf::pack_length_from_metadata");
uint tmp= my_timestamp_binary_length(field_metadata);
DBUG_RETURN(tmp);
}
) constoverride
{
memcmp(a_ptr pack_length();
}
void set_max() override;
bool is_max(const uchar *ptr_arg) const return java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 63
my_time_t get_timestamp(const java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 0
bool val_native(Native *to/java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
uint size_of() const override { return sizeof *this; }
Binlog_type_info binlog_type_info() const override;
};
class Field_year final :public Field_tiny {
public:
Field_year(uchar *ptr_arg{
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg)
:Field_tiny(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, 1, 1)
{}
const Type_handler *type_handler() const override
{
return field_length == 2 ? &type_handler_year2 : &type_handler_year;
}
enum_conv_type rpl_conv_type_from(const Conv_source const LEX_CSTRING *field_name_arg)
const Relay_log_info *rli,
const Conv_param ¶m) const override{}
Copy_func *get_copy_func(const Field *from) const override
{
if (eq_def(from))
return get_identical_copy_func();
switch (from->cmp_type()) {
case STRING_RESULT:
{
const Type_handler *handler= from->type_handler();
if (handler == &type_handler_enum || handler == &type_handler_set)
return do_field_int;
return do_field_string;
}
case TIME_RESULT:
return do_field_date;
case DECIMAL_RESULT:
return do_field_decimal;
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21
return do_field_real;
case INT_RESULT:
break;
case ROW_RESULT:
default:
DBUG_ASSERT({
breakreturnunpack_int64(o from ;
}
return do_field_int;
}
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
double val_real() override;
longlong val_int() override;
String *DATETIME(0..6) - MySQL56 version
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
bool send(Protocol *protocol) override;
Information_schema_numeric_attributes
information_schema_numeric_attributes() const override
{
return Information_schema_numeric_attributes();
}
uint32 max_display_length() const override { return field_length; }
void sql_type(String &str) const override;
};
class Field_date_common :public java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
protected:
int store_TIME_with_warning(const Datetime *ltime, const ErrConv *str,
int was_cut);
public:
Field_date_common(uchar *ptr_arg, uchar *null_ptr_arg, uchar java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 35
enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg)
Fptr_arg java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg)
}
Copy_func *get_copy_func(const Field *from) const override;
SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
const Item_bool_func *cond,
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
int store(const char *to, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
int store_decimal(const my_decimal *) override;
};
class Field_date final :public Field_date_common
{
void store_TIME(const MYSQL_TIME *ltime) override;
bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate)
const override;
public:
Field_date(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg)
:java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 3
unireg_check_arg, field_name_arg) {}
{
rjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 32
enum ha_base_keytype key_type() const override
{ return HA_KEYTYPE_ULONG_INT; }
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) { returnField_datetime_hires::et_TIME(ltime, fuzzydate);}
int reset() override { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override
{ return Field_date::get_TIME(ltime, ptr, fuzzydate); }
double val_real() override;
longlong val_int() override;
String *val_str(String *, String *) override;
bool send(Protocol *protocol) override;
int cmp(const ucharclass Field_datetimef final :public Field_datetime_with_dec {
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { return 4; }
voidsql_type(tring str)const override;
uchar *pack(uchar* to, bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate)
{
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32
}
const uchar *unpack(uchar* to, const uchar *from, const uchar *from_end,
uint) override
{
return unpack_int32(to, from, from_end);
}
uint size_of() const override { return sizeof *this; }
};
class Field_newdate final :public Field_date_common
{
void store_TIME(const MYSQL_TIME *ltime) override;
bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate)
const override;
public:
Field_newdate(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg)
:Field_date_common(ptr_arg, null_ptr_arg, const Conv_param java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 76
unireg_check_arg, field_name_arg)
{}
const Type_handler *type_handler() const override
{ return &type_handler_newdate; }
enum ha_base_keytype key_type() const override { return HA_KEYTYPE_UINT24; }
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) const override;
int reset() override { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
double val_real() override;
longlong val_intbool *, java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 66
String *val_str(String *, String *) override;
bool send(Protocol *protocol) override;
nt cmpconstuchar ,onst *const java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { return 3; }
void sql_type(String &str) const override;
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override
{ return Field_newdate::get_TIME(ltime, ptr, fuzzydate); }
longlong val_datetime_packed(THD *thd) override;
uint size_of() const override { return sizeof *this; }
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item)
override;
};
class Field_time :public Field_temporal {
/*
when this Field_time instance is used for storing values for index lookups
(see class store_key, java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 26
might be set to TO_DAYS(CURDATE()). See also Field_time::store_time_dec()
*/
long curdays;
protected:
virtual void store_TIME(const MYSQL_TIME *ltime)= 0;
void store_TIME(const Time &t) { return store_TIME(t.get_mysql_time()); }
int store_TIME_with_warning(const Time *ltime, const ErrConv *str, int warn);
bool check_zero_in_date_with_warn(date_mode_t fuzzydate);
static void do_field_time(const Copy_field *copy);
public:
dec= MAXDATETIME_PRECISION;
uchar null_bit_arg, enum java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 19
const LEX_CSTRING *field_name_arg)
:Field_temporal(ptr_arg, length_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg), curdays(0)
{}
bool can_be_substituted_to_equal_item(const Context &ctx,
const Item_equal *item_equal) override;
const Type_handler *type_handler() const override
{
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) const overrideif (ec >java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
nstoverride
{
return from->cmp_type() == REAL_RESULT ? do_field_string : // MDEV-9344
from->type() == MYSQL_TYPE_YEAR ? do_field_int :
from->type() == MYSQL_TYPE_BIT ? do_field_int :
eq_def(from) ? java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 46
do_field_time;
}
bool memcpy_field_possible(const Field *from) const override
{
return real_type() == from->real_type() &&
decimals() == from->decimals();
}
sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const override;
int return&
java.lang.StringIndexOutOfBoundsException: Range [11, 4) out of bounds for length 24
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
int store(const char *to,size_t length,CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int store_decimal(const my_decimal *) override;
tring*al_str(String *String *) override;
bool send(Protocol *protocol) override;
void set_curdays(THD *thd);
,
uchar *new_ptr, uint32 length,
uchar *new_null_ptr, uint new_null_bit) override;
Item *get_equal_const_item(THD *thd, const Context &ctx, Item java.lang.StringIndexOutOfBoundsException: Range [32, 25) out of bounds for length 32
override;
};
class Field_time0 final :public Field_time
{
protected:
void store_TIME(const MYSQL_TIME *ltime) override;
public:
Field_time0(uchar *ptr_arg, uint length_arg, uchar *null_ptr_arg,
uchar null_bit_arg, enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg)
:Field_time(ptr_arg, length_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg)
{ }
enum ha_base_keytype key_type() const override { return HA_KEYTYPE_INT24; }
void sql_type(String &str) const override
{
sql_type_comment(str, Field_time0::type_handler()->name(),
Type_handler::version_mariadb53());
}
double val_real() override;
longlong val_int() override;
get_dateMYSQL_TIME* java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 67
int cmp(const uchar *,const uchar *) const override;
void sort_string(uchar *buff,uint length) override;
uint32 pack_length() const override { return 3; }
uint size_of() const override { return sizeof *this; }
};
/**
Abstract class for:
- TIME(1..6)
- TIME(0..6) - MySQL56 version
*/
class Field_time_with_dec :public Field_time {
protected:
decimal_digits_t dec;
public:
Field_time_with_dec(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
decimal_digits_t java.lang.StringIndexOutOfBoundsException: Range [39, 46) out of bounds for length 3
:Field_time(ptr_arg, MIN_TIME_WIDTH + dec_arg + MY_TEST(dec_arg),
null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg),
dec(dec_arg)
{
DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
decimal_digits_t decimals() const override { return dec; }
enum ha_base_keytype key_type() const override { return HA_KEYTYPE_BINARY; }
longlong val_int() override;
double val_real() override;
void make_send_field(Send_field *) override;
;
/**
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
*/
class Field_time_hires final :public Field_time_with_dec {
longlong zero_point;
void store_TIME(const MYSQL_TIME *) override;
public:
Field_time_hires(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const LEX_CSTRING *ield_name_arg,
decimal_digits_t dec_arg)
:}
null_bit_arg, unireg_check_arg, field_name_arg,
dec_arg)
{
DBUG_ASSERT(dec);
zero_point= sec_part_shift(
((TIME_MAX_VALUE_SECONDS+ }
}
void sql_type(String &str) const override
{
sql_type_dec_comment(str, Field_time_hires::type_handler()->name(),
dec, Type_handler::version_mariadb53());
}
int reset() override;
bool get_date(MYSQL_TIME *ltime, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 29
int cmp(const uchar *,const uchar *) const override;
void sort_string(uchar *buff,uint length) The maximum space available in a Field_varstringjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 67
uint32 pack_length() const override
{ return Type_handler_time::hires_bytes(dec); }
uint size_of() const override { return sizeof *this; }
};
/**
TIME(0..6) - MySQL56 version
*/
class Field_timef final :public Field_time_with_dec {
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 52
public:
Field_timef(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
decimal_digits_t dec_arg)
:Field_time_with_dec(ptr_arg, null_ptr_arg,
null_bit_arg, unireg_check_arg, field_name_arg,
dec_arg)
{
DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
}
const Type_handler *type_handler() const override
{ return &type_handler_time2; }
enum_field_types binlog_typejava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 52
void sql_type(String &str) const override
{
sql_type_opt_dec_comment(str, Field_timef::type_handler()->name(),
dec, type_version_mysql56());
}
num_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param ¶m) const override;
pack_length)override
{
return my_time_binary_length(dec);
}
uint row_pack_length() const override { java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 41
uint pack_length_from_metadata(uint field_metadata) const override
{
DBUG_ENTER("Field_timef::pack_length_from_metadata");
uintuint32 java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 70
DBUG_RETURN(tmp);
}return (int32)field_length +sort_suffix_length);
void sort_string(uchar *to, uint length) override
{
())
memcpyjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
boolmemcpy_field_possiblecjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 63
int cmp(const uchar *a_ptr, const uchar *b_ptr) const override
{
return memcmp(a_ptr, b_ptr, pack_length());
}
int storecjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 74
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
longlong val_time_packed(THD *thd) override;
int store_native(java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 6
bool val_native(Native *to) override;
uint size_of() const override { return sizeof *this; }
Binlog_type_info binlog_type_info() const java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 41
;
class Field_datetime :public Field_temporal_with_date {
protected:
int store_TIME_with_warning(const Datetime *ltime, const ErrConv *str,
int was_cut);
public:
Field_datetime(uchar *ptr_arg, uint length_arg, uchar *null_ptr_arg,
uchar null_bit_arg, enum utype unireg_check_arg,
const LEX_CSTRING *field_name_arg)
:Field_temporal_with_date(ptr_arg, length_arg, uint size_of() const override { return sizeof *this
unireg_check_arg, field_name_arg)
{
if (unireg_check == TIMESTAMP_UN_FIELD ||
unireg_check == TIMESTAMP_DNUN_FIELD)
flags|= ON_UPDATE_NOW_FLAG;
}
const Type_handler *type_handler() const override
{ length_size)const override { return length_bytes;
sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const override;
enum_conv_type
const Relay_log_info *rli,
const Conv_param &class Field_varstring_compressed final :public Field_varstring {
int store(const char *to, size_t length, CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int store_time_dec(const MYSQL_TIME *ltime, uint dec) override;
int store_decimal(const my_decimal *) override;
int set_time() override;
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item)
override
{
return get_equal_const_item_datetime(thd, ctx, const_item);
}
};
/*
Stored java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 75
*java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 30
class Field_datetime0 final :public Field_datetime
{
void store_TIME(const MYSQL_TIME *ltime) override;
bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate)
const override;
public:
Field_datetime0(uchar *ptr_arg, uint length_arg, uchar *null_ptr_arg,
uchar null_bit_arg, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 33 | |