MyRocks - missing server binary collation patch

Bug #1674867 reported by George Ormond Lorch III
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Percona Server moved to
Status tracked in 5.7
Fix Released
George Ormond Lorch III
Fix Released
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:
Fix sort order for empty strings in 'text' columns
This is a fix for an upstream bug:

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.

Fix length in Field_blob::make_sort_key
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

Revision history for this message
George Ormond Lorch III (gl-az) wrote :
tags: added: upstream
tags: added: myrocks tokubackup
tags: added: tokudb
removed: tokubackup
Revision history for this message
George Ormond Lorch III (gl-az) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers

Remote bug watches

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