mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
10.0-base merge
This commit is contained in:
@ -208,7 +208,7 @@ int compare_lengths(Field *field, enum_field_types source_type, uint16 metadata)
|
||||
DBUG_PRINT("result", ("%d", result));
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
#endif //MYSQL_CLIENT
|
||||
/*********************************************************************
|
||||
* table_def member definitions *
|
||||
*********************************************************************/
|
||||
@ -219,7 +219,7 @@ int compare_lengths(Field *field, enum_field_types source_type, uint16 metadata)
|
||||
*/
|
||||
uint32 table_def::calc_field_size(uint col, uchar *master_data) const
|
||||
{
|
||||
uint32 length;
|
||||
uint32 length= 0;
|
||||
|
||||
switch (type(col)) {
|
||||
case MYSQL_TYPE_NEWDECIMAL:
|
||||
@ -316,7 +316,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
|
||||
case MYSQL_TYPE_VARCHAR:
|
||||
{
|
||||
length= m_field_metadata[col] > 255 ? 2 : 1; // c&p of Field_varstring::data_length()
|
||||
DBUG_ASSERT(uint2korr(master_data) > 0);
|
||||
length+= length == 1 ? (uint32) *master_data : uint2korr(master_data);
|
||||
break;
|
||||
}
|
||||
@ -326,17 +325,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
|
||||
case MYSQL_TYPE_BLOB:
|
||||
case MYSQL_TYPE_GEOMETRY:
|
||||
{
|
||||
#if 1
|
||||
/*
|
||||
BUG#29549:
|
||||
This is currently broken for NDB, which is using big-endian
|
||||
order when packing length of BLOB. Once they have decided how to
|
||||
fix the issue, we can enable the code below to make sure to
|
||||
always read the length in little-endian order.
|
||||
*/
|
||||
Field_blob fb(m_field_metadata[col]);
|
||||
length= fb.get_packed_size(master_data);
|
||||
#else
|
||||
/*
|
||||
Compute the length of the data. We cannot use get_length() here
|
||||
since it is dependent on the specific table (and also checks the
|
||||
@ -362,7 +350,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
|
||||
}
|
||||
|
||||
length+= m_field_metadata[col];
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -371,7 +358,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
/**
|
||||
*/
|
||||
void show_sql_type(enum_field_types type, uint16 metadata, String *str, CHARSET_INFO *field_cs)
|
||||
|
Reference in New Issue
Block a user