List:Commits« Previous MessageNext Message »
From:gluh Date:April 25 2006 8:14am
Subject:bk commit into 5.0 tree (gluh:1.2098) BUG#19236
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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.2098 06/04/25 13:14:49 gluh@stripped +4 -0
  Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH

  sql/sql_show.cc
    1.315 06/04/25 13:14:43 gluh@stripped +1 -1
    Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
      

  mysql-test/t/information_schema.test
    1.71 06/04/25 13:14:43 gluh@stripped +9 -0
    Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
     test case

  mysql-test/r/join.result
    1.37 06/04/25 13:14:43 gluh@stripped +2 -2
    Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
      result fix

  mysql-test/r/information_schema.result
    1.100 06/04/25 13:14:43 gluh@stripped +8 -0
    Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
      test case

# 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:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/5.0.17204

--- 1.314/sql/sql_show.cc	Tue Apr 25 10:52:14 2006
+++ 1.315/sql/sql_show.cc	Tue Apr 25 13:14:43 2006
@@ -2652,7 +2652,7 @@ static int get_schema_column_record(THD 
         field->real_type() == MYSQL_TYPE_STRING)     // For binary type
     {
       uint32 octet_max_length= field->max_length();
-      if (octet_max_length != (uint32) 4294967295U)
+      if (is_blob && octet_max_length != (uint32) 4294967295U)
         octet_max_length /= field->charset()->mbmaxlen;
       longlong char_max_len= is_blob ? 
         (longlong) octet_max_length / field->charset()->mbminlen :

--- 1.99/mysql-test/r/information_schema.result	Mon Mar 20 14:17:41 2006
+++ 1.100/mysql-test/r/information_schema.result	Tue Apr 25 13:14:43 2006
@@ -1104,3 +1104,11 @@ group by column_type order by num;
 column_type	group_concat(table_schema, '.', table_name)	num
 varchar(20)	information_schema.COLUMNS	1
 varchar(7)	information_schema.ROUTINES,information_schema.VIEWS	2
+create table t1(f1 char(1) not null, f2 char(9) not null)
+default character set utf8;
+select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
+information_schema.columns where table_schema='test' and table_name = 't1';
+CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH
+1	3
+9	27
+drop table t1;

--- 1.70/mysql-test/t/information_schema.test	Mon Mar 20 14:17:41 2006
+++ 1.71/mysql-test/t/information_schema.test	Tue Apr 25 13:14:43 2006
@@ -814,3 +814,12 @@ from information_schema.columns where
 table_schema='information_schema' and
 (column_type = 'varchar(7)' or column_type = 'varchar(20)')
 group by column_type order by num;
+
+#
+# Bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
+#
+create table t1(f1 char(1) not null, f2 char(9) not null)
+default character set utf8;
+select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
+information_schema.columns where table_schema='test' and table_name = 't1';
+drop table t1;

--- 1.36/mysql-test/r/join.result	Mon Mar  6 13:11:04 2006
+++ 1.37/mysql-test/r/join.result	Tue Apr 25 13:14:43 2006
@@ -700,8 +700,8 @@ ERROR 42S22: Unknown column 't1.b' in 'o
 select * from information_schema.statistics join information_schema.columns
 using(table_name,column_name) where table_name='user';
 TABLE_NAME	COLUMN_NAME	TABLE_CATALOG	TABLE_SCHEMA	NON_UNIQUE	INDEX_SCHEMA	INDEX_NAME	SEQ_IN_INDEX	COLLATION	CARDINALITY	SUB_PART	PACKED	NULLABLE	INDEX_TYPE	COMMENT	TABLE_CATALOG	TABLE_SCHEMA	ORDINAL_POSITION	COLUMN_DEFAULT	IS_NULLABLE	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	COLUMN_TYPE	COLUMN_KEY	EXTRA	PRIVILEGES	COLUMN_COMMENT
-user	Host	NULL	mysql	0	mysql	PRIMARY	1	A	NULL	NULL	NULL		BTREE		NULL	mysql	1		NO	char	20	60	NULL	NULL	utf8	utf8_bin	char(60)	PRI		select,insert,update,references	
-user	User	NULL	mysql	0	mysql	PRIMARY	2	A	5	NULL	NULL		BTREE		NULL	mysql	2		NO	char	5	16	NULL	NULL	utf8	utf8_bin	char(16)	PRI		select,insert,update,references	
+user	Host	NULL	mysql	0	mysql	PRIMARY	1	A	NULL	NULL	NULL		BTREE		NULL	mysql	1		NO	char	60	180	NULL	NULL	utf8	utf8_bin	char(60)	PRI		select,insert,update,references	
+user	User	NULL	mysql	0	mysql	PRIMARY	2	A	5	NULL	NULL		BTREE		NULL	mysql	2		NO	char	16	48	NULL	NULL	utf8	utf8_bin	char(16)	PRI		select,insert,update,references	
 drop table t1;
 drop table t2;
 drop table t3;
Thread
bk commit into 5.0 tree (gluh:1.2098) BUG#19236gluh25 Apr