mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18880: Optimizer trace prints date in hexadecimal
Introduced a print_key_value function to makes sure that the trace prints data in readable format for readable characters and the rest of the characters are printed as hexadecimal.
This commit is contained in:
14
sql/field.h
14
sql/field.h
@ -1383,6 +1383,8 @@ public:
|
||||
virtual int set_time() { return 1; }
|
||||
bool set_warning(Sql_condition::enum_warning_level, unsigned int code,
|
||||
int cuted_increment, ulong current_row=0) const;
|
||||
virtual void print_key_value(String *out, uint32 length);
|
||||
void print_key_value_binary(String *out, const uchar* key, uint32 length);
|
||||
protected:
|
||||
bool set_warning(unsigned int code, int cuted_increment) const
|
||||
{
|
||||
@ -3592,6 +3594,7 @@ public:
|
||||
{ return charset() == &my_charset_bin ? FALSE : TRUE; }
|
||||
Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type);
|
||||
virtual uint get_key_image(uchar *buff,uint length, imagetype type);
|
||||
void print_key_value(String *out, uint32 length);
|
||||
private:
|
||||
int save_field_metadata(uchar *first_byte);
|
||||
};
|
||||
@ -3697,6 +3700,7 @@ public:
|
||||
uint is_equal(Create_field *new_field);
|
||||
void hash(ulong *nr, ulong *nr2);
|
||||
uint length_size() { return length_bytes; }
|
||||
void print_key_value(String *out, uint32 length);
|
||||
private:
|
||||
int save_field_metadata(uchar *first_byte);
|
||||
};
|
||||
@ -4035,6 +4039,7 @@ public:
|
||||
uint32 char_length() const;
|
||||
uint32 character_octet_length() const;
|
||||
uint is_equal(Create_field *new_field);
|
||||
void print_key_value(String *out, uint32 length);
|
||||
|
||||
friend void TABLE::remember_blob_values(String *blob_storage);
|
||||
friend void TABLE::restore_blob_values(String *blob_storage);
|
||||
@ -4159,6 +4164,10 @@ public:
|
||||
geometry_type get_geometry_type() { return geom_type; };
|
||||
static geometry_type geometry_type_merge(geometry_type, geometry_type);
|
||||
uint get_srid() { return srid; }
|
||||
void print_key_value(String *out, uint32 length)
|
||||
{
|
||||
out->append(STRING_WITH_LEN("unprintable_geometry_value"));
|
||||
}
|
||||
};
|
||||
|
||||
uint gis_field_options_image(uchar *buff, List<Create_field> &create_fields);
|
||||
@ -4466,6 +4475,11 @@ public:
|
||||
{
|
||||
return get_mm_leaf_int(param, key_part, cond, op, value, true);
|
||||
}
|
||||
void print_key_value(String *out, uint32 length)
|
||||
{
|
||||
val_int_as_str(out, 1);
|
||||
}
|
||||
|
||||
private:
|
||||
virtual size_t do_last_null_byte() const;
|
||||
int save_field_metadata(uchar *first_byte);
|
||||
|
Reference in New Issue
Block a user