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 /sql/item.h | |
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 'sql/item.h')
-rw-r--r-- | sql/item.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index 126730bb892..250bb3f67ef 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1817,7 +1817,7 @@ class Item_empty_string :public Item_string public: Item_empty_string(const char *header,uint length, CHARSET_INFO *cs= NULL) : Item_string("",0, cs ? cs : &my_charset_utf8_general_ci) - { name=(char*) header; max_length= cs ? length * cs->mbmaxlen : length; } + { name=(char*) header; max_length= length * collation.collation->mbmaxlen; } void make_field(Send_field *field); }; |