Below is the list of changes that have just been committed into a local
5.0 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, 2007-07-03 16:59:54+05:00, bar@stripped +3 -0
Bug#29333 myisam corruption with character set cp932 collate cp932_japanese_ci
Problem: wrong comparison with trailing space.
This problem was fixed for all other character sets under terms of
bug 7788 ""Table is full" occurs during a multitable update".
ctype-cp932.c was forgotten.
Fix: applying the same fix for ctype-cp932.c.
mysql-test/r/ctype_cp932.result@stripped, 2007-07-03 16:59:53+05:00, bar@stripped +16 -0
Adding test
mysql-test/t/ctype_cp932.test@stripped, 2007-07-03 16:59:53+05:00, bar@stripped +22 -0
Adding test
strings/ctype-cp932.c@stripped, 2007-07-03 16:59:53+05:00, bar@stripped +2 -1
Applying the same fix which was done for all other
character sets under terms of bug 7788.
diff -Nrup a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result
--- a/mysql-test/r/ctype_cp932.result 2007-03-01 21:12:54 +04:00
+++ b/mysql-test/r/ctype_cp932.result 2007-07-03 16:59:53 +05:00
@@ -11335,6 +11335,22 @@ cp932_bin 6109
cp932_bin 61
cp932_bin 6120
drop table t1;
+create table t2 (a char(1));
+insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
+insert into t2 values ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
+create table t1 (
+a varchar(2) character set cp932
+) engine=myisam;
+insert into t1
+select unhex(concat(t24.a, t23.a, t22.a, t21.a))
+from t2 t21, t2 t22, t2 t23, t2 t24;
+delete from t1 where a='';
+alter table t1 add key(a);
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+drop table t2;
create table t1 (col1 varchar(1)) character set cp932;
insert into t1 values ('a');
insert into t1 values ('ab');
diff -Nrup a/mysql-test/t/ctype_cp932.test b/mysql-test/t/ctype_cp932.test
--- a/mysql-test/t/ctype_cp932.test 2007-03-01 21:12:54 +04:00
+++ b/mysql-test/t/ctype_cp932.test 2007-07-03 16:59:53 +05:00
@@ -404,6 +404,28 @@ SET collation_connection='cp932_bin';
-- source include/ctype_filesort.inc
#
+# Bug#29333 myisam corruption with
+# character set cp932 collate cp932_japanese_ci
+#
+create table t2 (a char(1));
+insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
+insert into t2 values ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
+create table t1 (
+ a varchar(2) character set cp932
+) engine=myisam;
+--disable_warnings
+insert into t1
+select unhex(concat(t24.a, t23.a, t22.a, t21.a))
+from t2 t21, t2 t22, t2 t23, t2 t24;
+--enable_warnings
+delete from t1 where a='';
+alter table t1 add key(a);
+check table t1;
+drop table t1;
+drop table t2;
+
+
+#
# Bug#12547: Inserting long string into varchar causes table crash in cp932
#
create table t1 (col1 varchar(1)) character set cp932;
diff -Nrup a/strings/ctype-cp932.c b/strings/ctype-cp932.c
--- a/strings/ctype-cp932.c 2007-01-22 16:10:42 +04:00
+++ b/strings/ctype-cp932.c 2007-07-03 16:59:53 +05:00
@@ -263,11 +263,12 @@ static int my_strnncollsp_cp932(CHARSET_
a_end= b_end;
a= b;
swap= -1; /* swap sign of result */
+ res= -res;
}
for (; a < a_end ; a++)
{
if (*a != ' ')
- return ((int) *a - (int) ' ') ^ swap;
+ return ((int) *a < (int) ' ') ? -swap : swap;
}
}
return res;
| Thread |
|---|
| • bk commit into 5.0 tree (bar:1.2517) BUG#29333 | bar | 3 Jul |