Bug #84723 Removed desc/reverse options to weight_string
Submitted: 30 Jan 2017 15:45 Modified: 1 Feb 2017 18:14
Reporter: Steinar Gunderson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:8.0.1 OS:Any
Assigned to: CPU Architecture:Any

[30 Jan 2017 15:45] Steinar Gunderson
Description:
strnxfrm has a large set of flags that are not actually used by anything _except_ our own debugging function weight_string(). Since this function is not meant for end users (only for people developing collations), we can remove some complexity.

In particular, this means that the following syntaxes will stop working:

select hex(weight_string('abc' as char(5) LEVEL 1));
select hex(weight_string('abc' as char(5) LEVEL 1 DESC));
select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE));
select hex(weight_string('abc' as char(5) LEVEL 1-3 DESC REVERSE));

These will continue working as before:

select hex(weight_string('abc'));
select hex(weight_string('abc' as char(5)));
select hex(weight_string('abc',25, 4, 0xC0));

The flags field (fourth argument to weight_string() in the last example) will continue to support the two flags MY_STRXFRM_PAD_WITH_SPACE (0x40) and MY_STRXFRM_PAD_TO_MAXLEN (0x80) as before, but all other flags will now be ignored. As far as I know, the documentation currently does not actually say anything about these flags bits, which is perhaps just as well.

How to repeat:
N/A

Suggested fix:
N/A
[1 Feb 2017 18:14] Paul DuBois
Posted by developer:
 
Noted in 8.0.1 changelog.

The WEIGHT_STRING() debugging function no longer supports the LEVEL
clause.