MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:V Narayanan Date:September 17 2009 12:00pm
Subject:bzr commit into mysql-5.1-bugteam branch (v.narayanan:3105) Bug#46448
View as plain text  
#At file:///home/narayanan/Work/mysql_checkouts/shared_repository_directory/mysql-5.1-bugteam-46448-01/ based on revid:kristofer.pettersson@stripped

 3105 V Narayanan	2009-09-17
      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.
     @ 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.

=== modified file 'strings/ctype-simple.c'
--- a/strings/ctype-simple.c	2009-02-13 16:41:47 +0000
+++ b/strings/ctype-simple.c	2009-09-17 11:59:56 +0000
@@ -185,8 +185,8 @@ int my_strnncollsp_simple(CHARSET_INFO *
     for (end= a + a_length-length; a < end ; a++)
-      if (map[*a] != ' ')
-	return (map[*a] < ' ') ? -swap : swap;
+      if (map[*a] != map[' '])
+	return (map[*a] < map[' ']) ? -swap : swap;
   return res;

Attachment: [text/bzr-bundle] bzr/
bzr commit into mysql-5.1-bugteam branch (v.narayanan:3105) Bug#46448V Narayanan17 Sep
  • Re: bzr commit into mysql-5.1-bugteam branch (v.narayanan:3105)Bug#46448Mattias Jonsson21 Sep