Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
In MySQL when the mapping for space is changed to something other than 0x20 by defining a different collation, then space is not ignored when comparing two strings. This was happening because the function that performs the comparison of two strings while ignoring ending spaces, was comparing the collation value of a space with the ascii value of the ' ' character. This should be changed to do comparison between the collated values. mysql-test/r/ctype_ldml.result: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Result file for test case. mysql-test/std_data/Index.xml: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Added entry for new test collation in the index file. mysql-test/std_data/latin1.xml: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Added support for new collation for test. mysql-test/t/ctype_ldml.test: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Added test case to ensure trailing spaces are not ignored. strings/ctype-simple.c: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 change my_strnncollsp_simple to compare collated values when checking for trailing spaces. Currently the comparison happens between a collated value and the ascii value.
Showing
Please register or sign in to comment