diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-08-28 07:42:43 +0200 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-08-28 07:42:43 +0200 |
commit | 0641e4edb1287b61f877b774437865efe6003271 (patch) | |
tree | b804b048cfddaa8e5fe5af8fccdac9aea0678906 /sql/field.cc | |
parent | f41774215dd4393ec4d3a6b8017554be2eb7c50c (diff) | |
download | mariadb-git-0641e4edb1287b61f877b774437865efe6003271.tar.gz |
Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
sql/field.cc:
Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
- correct previous patch
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/field.cc b/sql/field.cc index c8e1572d60f..ed1877fca78 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7616,19 +7616,16 @@ uchar *Field_blob::pack(uchar *to, const uchar *from, uint max_length) uint32 length=get_length(); // Length of from string if (length > max_length) { - ptr=to; length=max_length; - store_length(length); // Store max length - ptr= (uchar*) from; + store_length(to,packlength,length,TRUE); } - else #ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) + else if (!table->s->db_low_byte_first) { - store_length(to,packlength,length,0); + store_length(to,packlength,length,TRUE); } - else #endif + else memcpy(to,from,packlength); // Copy length if (length) { @@ -7667,9 +7664,9 @@ const uchar *Field_blob::unpack(uchar *to, const uchar *from) { uint32 length=get_length(from); #ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) + if (!table->s->db_low_byte_first) { - store_length(to,packlength,length,1); + store_length(to,packlength,length,FALSE); } else #endif |