1
0
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:
tomas@whalegate.ndb.mysql.com
2007-08-27 15:40:49 +02:00
parent 857a157c3c
commit e1f827da84
2 changed files with 19 additions and 3 deletions

View File

@ -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));