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, 2006-09-29 16:24:11+05:00, bar@stripped +3 -0
Bug#21620 ALTER TABLE affects other columns
Problem: for character sets having mbmaxlen==2,
any ALTER TABLE changed TEXT column type to MEDIUMTEXT,
due to wrong "internal length to create length" formula.
Fix: removing rounding code introduced in early 4.1 time,
which is not correct anymore.
mysql-test/r/ctype_gbk.result@stripped, 2006-09-29 16:24:06+05:00, bar@stripped +10 -0
Adding test case
mysql-test/t/ctype_gbk.test@stripped, 2006-09-29 16:24:06+05:00, bar@stripped +10 -0
Adding test case
sql/field.cc@stripped, 2006-09-29 16:24:06+05:00, bar@stripped +1 -1
Fixing "internal length to create length" formula.
# 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-5.0.b19960rpl
--- 1.323/sql/field.cc 2006-09-29 16:24:19 +05:00
+++ 1.324/sql/field.cc 2006-09-29 16:24:19 +05:00
@@ -8877,7 +8877,7 @@
case 3: sql_type= FIELD_TYPE_MEDIUM_BLOB; break;
default: sql_type= FIELD_TYPE_LONG_BLOB; break;
}
- length=(length+charset->mbmaxlen-1) / charset->mbmaxlen;
+ length/= charset->mbmaxlen;
key_length/= charset->mbmaxlen;
break;
case MYSQL_TYPE_STRING:
--- 1.3/mysql-test/r/ctype_gbk.result 2006-09-29 16:24:19 +05:00
+++ 1.4/mysql-test/r/ctype_gbk.result 2006-09-29 16:24:19 +05:00
@@ -168,3 +168,13 @@
select hex(convert(_gbk 0xA14041 using ucs2));
hex(convert(_gbk 0xA14041 using ucs2))
003F0041
+create table t1 (c1 text not null, c2 text not null) character set gbk;
+alter table t1 change c1 c1 mediumtext character set gbk not null;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` mediumtext NOT NULL,
+ `c2` text NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=gbk
+drop table t1;
+End of 5.0 tests
--- 1.4/mysql-test/t/ctype_gbk.test 2006-09-29 16:24:19 +05:00
+++ 1.5/mysql-test/t/ctype_gbk.test 2006-09-29 16:24:19 +05:00
@@ -42,3 +42,13 @@
select hex(convert(_gbk 0xA14041 using ucs2));
# End of 4.1 tests
+
+#
+# Bug#21620 ALTER TABLE affects other columns
+#
+create table t1 (c1 text not null, c2 text not null) character set gbk;
+alter table t1 change c1 c1 mediumtext character set gbk not null;
+show create table t1;
+drop table t1;
+
+--echo End of 5.0 tests
| Thread |
|---|
| • bk commit into 5.0 tree (bar:1.2283) BUG#21620 | bar | 29 Sep |