diff options
author | Chad MILLER <chad@mysql.com> | 2008-08-15 16:13:27 -0400 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2008-08-15 16:13:27 -0400 |
commit | 21598ea0e6c9495aba817b0101488549e4e78bd3 (patch) | |
tree | 5745bf83cb4340a9a6d9cf6535ad31a1af5acda8 /mysql-test/t/show_check.test | |
parent | 65c3870cfcad08f410a56e4b198b4a5078d04c20 (diff) | |
download | mariadb-git-21598ea0e6c9495aba817b0101488549e4e78bd3.tar.gz |
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
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r-- | mysql-test/t/show_check.test | 20 |
1 files changed, 20 insertions, 0 deletions
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 |