MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:bar Date:July 25 2006 12:27pm
Subject:bk commit into 4.1 tree (bar:1.2528) BUG#19741
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-07-25 17:27:53+05:00, bar@stripped +3 -0
  Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
  LIKE craashed with a pattern having letters in the range 128..255
  (e.g. A WITH ACUTE or C WITH CARON) because of wrong cast from
  signed char to unsigned int.

  mysql-test/r/ctype_cp1250_ch.result@stripped, 2006-07-25 17:27:49+05:00, bar@stripped +8 -0
    Adding test case

  mysql-test/t/ctype_cp1250_ch.test@stripped, 2006-07-25 17:27:49+05:00, bar@stripped +10 -0
    Adding test case

  strings/ctype-win1250ch.c@stripped, 2006-07-25 17:27:49+05:00, bar@stripped +2 -2
    Fixing wrong cast from "signed char" -> "uint" to
    "signed char" -> "unsigned char" -> uint, to properly
    handle bytes 128..255.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-4.1.b19741

--- 1.47/strings/ctype-win1250ch.c	2006-07-25 17:27:59 +05:00
+++ 1.48/strings/ctype-win1250ch.c	2006-07-25 17:27:59 +05:00
@@ -634,11 +634,11 @@
       ptr++;					/* Skip escape */
     else if (*ptr == w_one || *ptr == w_many)	/* '_' or '%' in SQL */
       break;
-    *min_str = like_range_prefix_min_win1250ch[(uint)(*ptr)];
+    *min_str = like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
     if (*min_str != min_sort_char)
       only_min_found= 0;
     min_str++;
-    *max_str++ = like_range_prefix_max_win1250ch[(uint)(*ptr)];
+    *max_str++ = like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
   }
 
   *min_length = (uint) (min_str - min_org);

--- 1.4/mysql-test/r/ctype_cp1250_ch.result	2006-07-25 17:27:59 +05:00
+++ 1.5/mysql-test/r/ctype_cp1250_ch.result	2006-07-25 17:27:59 +05:00
@@ -42,3 +42,11 @@
 6	aaaaaa
 7	aaaaaaa
 drop table t1;
+set names cp1250;
+create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
+a
+drop table t1;

--- 1.4/mysql-test/t/ctype_cp1250_ch.test	2006-07-25 17:27:59 +05:00
+++ 1.5/mysql-test/t/ctype_cp1250_ch.test	2006-07-25 17:27:59 +05:00
@@ -44,4 +44,14 @@
 select * from t1 where str like 'aa%';
 drop table t1;
 
+#
+# Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
+#
+set names cp1250;
+create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
+drop table t1;
+
 # End of 4.1 tests
Thread
bk commit into 4.1 tree (bar:1.2528) BUG#19741bar25 Jul