mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values
The code in Type_handler_blob****::make_conversion_table_field()
erroneously assumed that row format replication uses
MYSQL_TYPE_TINYBLOB, MYSQL_TYPE_BLOB, MYSQL_TYPE_MEDIUMBLOB,
MYSQL_TYPE_LONGBLOB type codes to tranfer BLOB variations.
In fact, all BLOB variations use MYSQL_TYPE_BLOB as the type
code, while the BLOB packlength (1,2,3 or 4) it tranferred
in metadata.
The bug was introduced by aee068085d
(MDEV-9238 Wrap create_virtual_tmp_table() into a class, split into different steps)
This commit is contained in:
@ -416,43 +416,44 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class Type_handler_tiny_blob: public Type_handler_string_result
|
||||
class Type_handler_blob_common: public Type_handler_string_result
|
||||
{
|
||||
public:
|
||||
virtual ~Type_handler_blob_common() { }
|
||||
Field *make_conversion_table_field(TABLE *, uint metadata,
|
||||
const Field *target) const;
|
||||
};
|
||||
|
||||
|
||||
class Type_handler_tiny_blob: public Type_handler_blob_common
|
||||
{
|
||||
public:
|
||||
virtual ~Type_handler_tiny_blob() {}
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_TINY_BLOB; }
|
||||
Field *make_conversion_table_field(TABLE *, uint metadata,
|
||||
const Field *target) const;
|
||||
};
|
||||
|
||||
|
||||
class Type_handler_medium_blob: public Type_handler_string_result
|
||||
class Type_handler_medium_blob: public Type_handler_blob_common
|
||||
{
|
||||
public:
|
||||
virtual ~Type_handler_medium_blob() {}
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_MEDIUM_BLOB; }
|
||||
Field *make_conversion_table_field(TABLE *, uint metadata,
|
||||
const Field *target) const;
|
||||
};
|
||||
|
||||
|
||||
class Type_handler_long_blob: public Type_handler_string_result
|
||||
class Type_handler_long_blob: public Type_handler_blob_common
|
||||
{
|
||||
public:
|
||||
virtual ~Type_handler_long_blob() {}
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_LONG_BLOB; }
|
||||
Field *make_conversion_table_field(TABLE *, uint metadata,
|
||||
const Field *target) const;
|
||||
};
|
||||
|
||||
|
||||
class Type_handler_blob: public Type_handler_string_result
|
||||
class Type_handler_blob: public Type_handler_blob_common
|
||||
{
|
||||
public:
|
||||
virtual ~Type_handler_blob() {}
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
|
||||
Field *make_conversion_table_field(TABLE *, uint metadata,
|
||||
const Field *target) const;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user