Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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.1940 05/10/25 17:22:58 ramil@stripped +3 -0
Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.
sql/sql_show.cc
1.295 05/10/25 17:22:44 ramil@stripped +3 -2
Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.
adjust CHARACTER_MAXIMUM_LENGTH value for text fields.
mysql-test/t/information_schema.test
1.61 05/10/25 17:22:44 ramil@stripped +9 -0
Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.
mysql-test/r/information_schema.result
1.86 05/10/25 17:22:43 ramil@stripped +8 -0
Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.
# 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: ramil
# Host: myoffice.izhnet.ru
# Root: /usr/home/ram/work/5.0.b14290
--- 1.294/sql/sql_show.cc 2005-10-24 16:45:08 +05:00
+++ 1.295/sql/sql_show.cc 2005-10-25 17:22:44 +05:00
@@ -2559,8 +2559,9 @@
is_blob= (field->type() == FIELD_TYPE_BLOB);
if (field->has_charset() || is_blob)
{
- longlong char_max_len= is_blob ? (longlong) field->max_length() :
- (longlong) field->max_length()/field->charset()->mbmaxlen;
+ longlong char_max_len= is_blob ?
+ (longlong) field->max_length() / field->charset()->mbminlen :
+ (longlong) field->max_length() / field->charset()->mbmaxlen;
table->field[8]->store(char_max_len, TRUE);
table->field[8]->set_notnull();
table->field[9]->store((longlong) field->max_length(), TRUE);
--- 1.85/mysql-test/r/information_schema.result 2005-10-21 13:14:45 +05:00
+++ 1.86/mysql-test/r/information_schema.result 2005-10-25 17:22:43 +05:00
@@ -1025,3 +1025,11 @@
1
use test;
drop table t1;
+create table t1(a blob, b text charset utf8, c text charset ucs2);
+select data_type, character_octet_length, character_maximum_length
+from information_schema.columns where table_name='t1';
+data_type character_octet_length character_maximum_length
+blob 65535 65535
+text 65535 65535
+text 65535 32767
+drop table t1;
--- 1.60/mysql-test/t/information_schema.test 2005-10-21 13:14:45 +05:00
+++ 1.61/mysql-test/t/information_schema.test 2005-10-25 17:22:44 +05:00
@@ -727,3 +727,12 @@
select 1 from (select 1 from test.t1) a;
use test;
drop table t1;
+
+#
+# Bug #14290: character_maximum_length for text fields
+#
+
+create table t1(a blob, b text charset utf8, c text charset ucs2);
+select data_type, character_octet_length, character_maximum_length
+ from information_schema.columns where table_name='t1';
+drop table t1;
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1940) BUG#14290 | ramil | 25 Oct |