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
1.2143 05/03/25 16:08:54 bar@stripped +3 -0
Allow inserting of extra HKSCS and cp950 characters into a Big5 column.
strings/ctype-big5.c
1.70 05/03/25 16:08:39 bar@stripped +38 -1
Allow inserting of extra HKSCS and cp950 characters into a Big5 column.
mysql-test/t/ctype_big5.test
1.5 05/03/25 16:08:38 bar@stripped +9 -0
Allow inserting of extra HKSCS and cp950 characters into a Big5 column.
mysql-test/r/ctype_big5.result
1.6 05/03/25 16:08:38 bar@stripped +7 -0
Allow inserting of extra HKSCS and cp950 characters into a Big5 column.
# 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
--- 1.69/strings/ctype-big5.c 2005-02-01 18:27:01 +04:00
+++ 1.70/strings/ctype-big5.c 2005-03-25 16:08:39 +04:00
@@ -6271,6 +6271,43 @@
return 2;
}
+
+/*
+ Returns a well formed length of a BIG5 string.
+ CP950 and HKSCS additional characters are also accepted.
+*/
+static
+uint my_well_formed_len_big5(CHARSET_INFO *cs __attribute__((unused)),
+ const char *b, const char *e, uint pos)
+{
+ const char *b0= b;
+ const char *emb= e - 1; /* Last possible end of an MB character */
+ while (pos && b < e)
+ {
+ /*
+ Cast to int8 for extra safety. "char" can be unsigned
+ by default on some platforms.
+ */
+ if (((int8)b[0]) >= 0)
+ {
+ /* Single byte ascii character */
+ b++;
+ }
+ else if ((b < emb) && isbig5code((uchar)*b, (uchar)b[1]))
+ {
+ /* Double byte character */
+ b+= 2;
+ }
+ else
+ {
+ /* Wrong byte sequence */
+ break;
+ }
+ }
+ return b - b0;
+}
+
+
static MY_COLLATION_HANDLER my_collation_big5_chinese_ci_handler =
{
NULL, /* init */
@@ -6291,7 +6328,7 @@
mbcharlen_big5,
my_numchars_mb,
my_charpos_mb,
- my_well_formed_len_mb,
+ my_well_formed_len_big5,
my_lengthsp_8bit,
my_numcells_8bit,
my_mb_wc_big5, /* mb_wc */
--- 1.5/mysql-test/r/ctype_big5.result 2005-01-13 18:11:55 +04:00
+++ 1.6/mysql-test/r/ctype_big5.result 2005-03-25 16:08:38 +04:00
@@ -77,3 +77,10 @@
big5_bin 61
big5_bin 6120
drop table t1;
+SET NAMES big5;
+CREATE TABLE t1 (a text) character set big5;
+INSERT INTO t1 VALUES ('ùØ');
+SELECT * FROM t1;
+a
+ùØ
+DROP TABLE t1;
--- 1.4/mysql-test/t/ctype_big5.test 2005-01-13 18:11:55 +04:00
+++ 1.5/mysql-test/t/ctype_big5.test 2005-03-25 16:08:38 +04:00
@@ -16,3 +16,12 @@
-- source include/ctype_filesort.inc
SET collation_connection='big5_bin';
-- source include/ctype_filesort.inc
+
+#
+# Bugs#9357: TEXT columns break string with special word in BIG5 charset.
+#
+SET NAMES big5;
+CREATE TABLE t1 (a text) character set big5;
+INSERT INTO t1 VALUES ('ùØ');
+SELECT * FROM t1;
+DROP TABLE t1;
| Thread |
|---|
| • bk commit into 4.1 tree (bar:1.2143) | bar | 25 Mar |