MyRocks - missing server binary collation patch

Bug #1674867 reported by George Ormond Lorch III on 2017-03-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Fix Released
Medium
George Ormond Lorch III
5.7
Fix Released
Medium
George Ormond Lorch III

Bug Description

MyRocks testing needs some upstream Facebook MySQL patches in Percona Server. These patches also correct a basic issue with <charset>_bin ordering for both InnoDB and TokuDB.

Patches are:
https://github.com/facebook/mysql-5.6/commit/3fda3eb9bc7f7c5fec6ff2edd4057b7101102d69
Fix sort order for empty strings in 'text' columns
Summary:
This is a fix for an upstream bug: http://bugs.mysql.com/bug.php?id=81810

The problem is that Field_blob::make_sort_key will memzero the sort key for the empty string. However, for most collations, the empty string should sort as spaces, not as NUL characters.

The fix is to memzero only if the collation pad character happens to be 0 as well.

and

https://github.com/facebook/mysql-5.6/commit/fecef54c24b5b64037af1ecf2f8e6ced5a90a3ac
Fix length in Field_blob::make_sort_key
Summary:
For the binary collation in Field_blob::make_sort_key, we write out the length of the entire blob, even though the key itself may be shorter. We can miss out on duplicate key errors because of this:

Suppose key length is 1, and we want to encode "ab", "a". Then we get the following sort keys:

  'a' 0 2
  'a' 0 1

We want the two of them to produce the same key instead. To fix, define key length to be the min of blob length and requested key length.

Upstream tracking issue https://bugs.mysql.com/bug.php?id=81810

tags: added: upstream
tags: added: myrocks tokubackup
tags: added: tokudb
removed: tokubackup

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1799

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.