summaryrefslogtreecommitdiff
path: root/mysql-test/t/ctype_gbk.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-09-29 16:24:11 +0500
committerunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-09-29 16:24:11 +0500
commit880c9b2a8b5c5239701b60bdb5f6cc8559be3470 (patch)
tree7db5c90e591239f1d5acd192874c0e53699790ed /mysql-test/t/ctype_gbk.test
parent695bcb9e7b39c50bbc4bdba8e12aaa4375be3bee (diff)
downloadmariadb-git-880c9b2a8b5c5239701b60bdb5f6cc8559be3470.tar.gz
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: Adding test case mysql-test/t/ctype_gbk.test: Adding test case sql/field.cc: Fixing "internal length to create length" formula.
Diffstat (limited to 'mysql-test/t/ctype_gbk.test')
-rw-r--r--mysql-test/t/ctype_gbk.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test
index 7aec48586d8..5ff138fa97b 100644
--- a/mysql-test/t/ctype_gbk.test
+++ b/mysql-test/t/ctype_gbk.test
@@ -42,3 +42,13 @@ DROP TABLE t1;
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