diff options
author | Jan Lindström <jplindst@mariadb.org> | 2014-07-04 11:58:14 +0300 |
---|---|---|
committer | Jan Lindström <jplindst@mariadb.org> | 2014-07-04 11:58:14 +0300 |
commit | 84b3ec1fa4291c792cd63b70a4305e744b12eee4 (patch) | |
tree | 2f9db187a715c15701cbb457e6b93c812ab180cb | |
parent | 006cb2a6f95f96e67acc4e8ed7e2ecd97d4678e7 (diff) | |
download | mariadb-git-84b3ec1fa4291c792cd63b70a4305e744b12eee4.tar.gz |
Merge -r4105..4106 from codership/5.6
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 27 | ||||
-rw-r--r-- | storage/innobase/rem/rem0rec.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 27 | ||||
-rw-r--r-- | storage/xtradb/rem/rem0rec.cc | 2 |
4 files changed, 14 insertions, 44 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index f0ef468ffcd..79c994a78a0 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6261,7 +6261,6 @@ wsrep_store_key_val_for_row( const byte* data; ulint key_len; ulint true_len; - ulint sort_len; const CHARSET_INFO* cs; int error=0; @@ -6304,12 +6303,12 @@ wsrep_store_key_val_for_row( } memcpy(sorted, data, true_len); - sort_len = wsrep_innobase_mysql_sort( + true_len = wsrep_innobase_mysql_sort( mysql_type, cs->number, sorted, true_len, REC_VERSION_56_MAX_INDEX_COL_LEN); if (wsrep_protocol_version > 1) { - memcpy(buff, sorted, sort_len); + memcpy(buff, sorted, true_len); /* Note that we always reserve the maximum possible length of the true VARCHAR in the key value, though only len first bytes after the 2 length bytes contain @@ -6330,7 +6329,6 @@ wsrep_store_key_val_for_row( const CHARSET_INFO* cs; ulint key_len; ulint true_len; - ulint sort_len; int error=0; ulint blob_len; const byte* blob_data; @@ -6379,11 +6377,11 @@ wsrep_store_key_val_for_row( } memcpy(sorted, blob_data, true_len); - sort_len = wsrep_innobase_mysql_sort( + true_len = wsrep_innobase_mysql_sort( mysql_type, cs->number, sorted, true_len, REC_VERSION_56_MAX_INDEX_COL_LEN); - memcpy(buff, sorted, sort_len); + memcpy(buff, sorted, true_len); /* Note that we always reserve the maximum possible length of the BLOB prefix in the key value. */ @@ -6400,7 +6398,6 @@ wsrep_store_key_val_for_row( const CHARSET_INFO* cs = NULL; ulint true_len; - ulint sort_len; ulint key_len; const uchar* src_start; int error=0; @@ -6445,28 +6442,16 @@ wsrep_store_key_val_for_row( &error); } memcpy(sorted, src_start, true_len); - sort_len = wsrep_innobase_mysql_sort( + true_len = wsrep_innobase_mysql_sort( mysql_type, cs->number, sorted, true_len, REC_VERSION_56_MAX_INDEX_COL_LEN); - memcpy(buff, sorted, sort_len); + memcpy(buff, sorted, true_len); } else { memcpy(buff, src_start, true_len); } buff += true_len; - /* Pad the unused space with spaces. */ - -#ifdef REMOVED - if (true_len < key_len) { - ulint pad_len = key_len - true_len; - ut_a(!(pad_len % cs->mbminlen)); - - cs->cset->fill(cs, buff, pad_len, - 0x20 /* space */); - buff += pad_len; - } -#endif /* REMOVED */ } } diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index c1fee934fcd..03262d42003 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -2058,7 +2058,7 @@ wsrep_rec_get_foreign_key( case DATA_MYSQL: /* Copy the actual data */ ut_memcpy(buf, data, len); - *buf_len = wsrep_innobase_mysql_sort( + len = wsrep_innobase_mysql_sort( (int) (col_f->prtype & DATA_MYSQL_TYPE_MASK), (uint) diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 12042d7c0a4..397616750ba 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -6708,7 +6708,6 @@ wsrep_store_key_val_for_row( const byte* data; ulint key_len; ulint true_len; - ulint sort_len; const CHARSET_INFO* cs; int error=0; @@ -6751,12 +6750,12 @@ wsrep_store_key_val_for_row( } memcpy(sorted, data, true_len); - sort_len = wsrep_innobase_mysql_sort( + true_len = wsrep_innobase_mysql_sort( mysql_type, cs->number, sorted, true_len, REC_VERSION_56_MAX_INDEX_COL_LEN); if (wsrep_protocol_version > 1) { - memcpy(buff, sorted, sort_len); + memcpy(buff, sorted, true_len); /* Note that we always reserve the maximum possible length of the true VARCHAR in the key value, though only len first bytes after the 2 length bytes contain @@ -6777,7 +6776,6 @@ wsrep_store_key_val_for_row( const CHARSET_INFO* cs; ulint key_len; ulint true_len; - ulint sort_len; int error=0; ulint blob_len; const byte* blob_data; @@ -6826,11 +6824,11 @@ wsrep_store_key_val_for_row( } memcpy(sorted, blob_data, true_len); - sort_len = wsrep_innobase_mysql_sort( + true_len = wsrep_innobase_mysql_sort( mysql_type, cs->number, sorted, true_len, REC_VERSION_56_MAX_INDEX_COL_LEN); - memcpy(buff, sorted, sort_len); + memcpy(buff, sorted, true_len); /* Note that we always reserve the maximum possible length of the BLOB prefix in the key value. */ @@ -6847,7 +6845,6 @@ wsrep_store_key_val_for_row( const CHARSET_INFO* cs = NULL; ulint true_len; - ulint sort_len; ulint key_len; const uchar* src_start; int error=0; @@ -6892,28 +6889,16 @@ wsrep_store_key_val_for_row( &error); } memcpy(sorted, src_start, true_len); - sort_len = wsrep_innobase_mysql_sort( + true_len = wsrep_innobase_mysql_sort( mysql_type, cs->number, sorted, true_len, REC_VERSION_56_MAX_INDEX_COL_LEN); - memcpy(buff, sorted, sort_len); + memcpy(buff, sorted, true_len); } else { memcpy(buff, src_start, true_len); } buff += true_len; - /* Pad the unused space with spaces. */ - -#ifdef REMOVED - if (true_len < key_len) { - ulint pad_len = key_len - true_len; - ut_a(!(pad_len % cs->mbminlen)); - - cs->cset->fill(cs, buff, pad_len, - 0x20 /* space */); - buff += pad_len; - } -#endif /* REMOVED */ } } diff --git a/storage/xtradb/rem/rem0rec.cc b/storage/xtradb/rem/rem0rec.cc index 79a542845a3..64d03eace33 100644 --- a/storage/xtradb/rem/rem0rec.cc +++ b/storage/xtradb/rem/rem0rec.cc @@ -2016,7 +2016,7 @@ wsrep_rec_get_foreign_key( case DATA_MYSQL: /* Copy the actual data */ ut_memcpy(buf, data, len); - *buf_len = wsrep_innobase_mysql_sort( + len = wsrep_innobase_mysql_sort( (int) (col_f->prtype & DATA_MYSQL_TYPE_MASK), (uint) |