diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-17 11:00:51 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-17 11:00:51 +0100 |
commit | 84651126c0f101ea762eec0eb4045f533a00e96d (patch) | |
tree | 1bba1d0079b08cb10fe69e03942cd5f254dc735e /sql/rpl_utility.cc | |
parent | 1fa5183241e5a8e8e91690f0c35d676e9f3334ca (diff) | |
parent | f7c8dd6bc7bb6d46d1ae2b6fdb47227429387e33 (diff) | |
download | mariadb-git-84651126c0f101ea762eec0eb4045f533a00e96d.tar.gz |
MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r-- | sql/rpl_utility.cc | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index 59d92a7f09f..22241da1348 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -186,7 +186,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 * *********************************************************************/ @@ -197,7 +197,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: @@ -285,7 +285,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; } @@ -295,17 +294,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 @@ -331,7 +319,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const } length+= m_field_metadata[col]; -#endif break; } default: @@ -340,7 +327,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) |