From 21598ea0e6c9495aba817b0101488549e4e78bd3 Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Fri, 15 Aug 2008 16:13:27 -0400 Subject: Bug#37301 Length and Max_length differ with no obvious reason(2nd version) Length value is the length of the field, Max_length is the length of the field value. So Max_length can not be more than Length. The fix: fixed calculation of the Item_empty_string item length (Patch applied and queued on demand of Trudy/Davi.) sql/item.h: fixed calculation of the item length sql/sql_show.cc: removed unnecessary code --- mysql-test/t/show_check.test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/t/show_check.test') diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index cae3c3e157c..f4e0b906f60 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -844,4 +844,24 @@ show status like 'slow_queries'; # show variables like 'myisam_recover_options'; +# +# Bug#37301 Length and Max_length differ with no obvious reason +# +CREATE TABLE t1 ( + Codigo int(10) unsigned NOT NULL auto_increment, + Nombre varchar(255) default NULL, + Telefono varchar(255) default NULL, + Observaciones longtext, + Direccion varchar(255) default NULL, + Dni varchar(255) default NULL, + CP int(11) default NULL, + Provincia varchar(255) default NULL, + Poblacion varchar(255) default NULL, + PRIMARY KEY (Codigo) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +--enable_metadata +show create table t1; +--disable_metadata +drop table t1; + --echo End of 5.0 tests -- cgit v1.2.1