1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

less default_charset_info

This commit is contained in:
unknown
2002-12-20 17:14:46 +04:00
parent f6d3338a91
commit 54abb8e922
4 changed files with 7 additions and 8 deletions

View File

@@ -470,10 +470,11 @@ static void make_sortkey(register SORTPARAM *param,
switch (sort_field->result_type) {
case STRING_RESULT:
{
CHARSET_INFO *cs=item->charset();
if (item->maybe_null)
*to++=1;
/* All item->str() to use some extra byte for end null.. */
String tmp((char*) to,sort_field->length+4,default_charset_info);
String tmp((char*) to,sort_field->length+4,cs);
String *res=item->val_str(&tmp);
if (!res)
{
@@ -488,7 +489,6 @@ static void make_sortkey(register SORTPARAM *param,
break;
}
length=res->length();
CHARSET_INFO *cs=res->charset();
int diff=(int) (sort_field->length-length);
if (diff < 0)
{