mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
This commit is contained in:
18
sql/field.cc
18
sql/field.cc
@ -7622,6 +7622,13 @@ uchar *Field_blob::pack(uchar *to, const uchar *from, uint max_length)
|
||||
ptr= (uchar*) from;
|
||||
}
|
||||
else
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
if (table->s->db_low_byte_first)
|
||||
{
|
||||
store_length(to,packlength,length,0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
memcpy(to,from,packlength); // Copy length
|
||||
if (length)
|
||||
{
|
||||
@ -7658,8 +7665,17 @@ const uchar *Field_blob::unpack(uchar *to,
|
||||
|
||||
const uchar *Field_blob::unpack(uchar *to, const uchar *from)
|
||||
{
|
||||
memcpy(to,from,packlength);
|
||||
uint32 length=get_length(from);
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
if (table->s->db_low_byte_first)
|
||||
{
|
||||
store_length(to,packlength,length,1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
memcpy(to,from,packlength);
|
||||
}
|
||||
from+=packlength;
|
||||
if (length)
|
||||
memcpy_fixed(to+packlength, &from, sizeof(from));
|
||||
|
Reference in New Issue
Block a user