Hi all!
This is a patch for bug#23692 <http://bugs.mysql.com/23692> (Falcon: searches fail
if data is 0x00)
The bug report is available here:http://bugs.mysql.com/bug.php?id=23692
Here is a copy of my comment in the commit message, to give an
introduction to the patch :)
The solution is to append a pad key to the upper
bound search key, if its last character is equal
to or greater than the pad character. This is done
In order to make it position after all values with
trailing characters lower than the pad character.
For fields with a collation registered
[if (field->collation)], there is no efficient way
of checking if the last character is equal or greater
than the pad character, without iterating through the
entire key from the beginning.
I have discussed this with Alexander who suggests
to always pad the upper bound search key in these cases,
and to pad it to the length of the key, instead of
appending just a single character. This way I can use the
existing cs->coll->strnxfrm function.
In the other cases, I have checked on the last byte and
appended 0x20 if the byte was >= 0x20.
I have also added one more parameter to the makeKey methods
to say that this is a highKey.
The patch is available here
http://lists.mysql.com/commits/67022
And the test and result files are available her. I forgot to "bzr add"
them the first time :)
http://lists.mysql.com/commits/67023