diff options
author | unknown <bar@mysql.com> | 2005-01-13 18:12:04 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-01-13 18:12:04 +0400 |
commit | 9842aca3ef48bf56a6c3ee5b9e1159e4249ce346 (patch) | |
tree | 89b4be1d3a807d6f2554dce92b0a5ecd0a9009ab /sql | |
parent | bcb3783c7c88b06a8417a5734103ae856a2f7dbc (diff) | |
download | mariadb-git-9842aca3ef48bf56a6c3ee5b9e1159e4249ce346.tar.gz |
bug#7284: strnxfrm returns different results for equal strings
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 12 | ||||
-rw-r--r-- | sql/filesort.cc | 5 |
2 files changed, 4 insertions, 13 deletions
diff --git a/sql/field.cc b/sql/field.cc index e2c11cc7372..86073072a64 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4393,8 +4393,7 @@ void Field_string::sort_string(char *to,uint length) uint tmp=my_strnxfrm(field_charset, (unsigned char *) to, length, (unsigned char *) ptr, field_length); - if (tmp < length) - field_charset->cset->fill(field_charset, to + tmp, length - tmp, ' '); + DBUG_ASSERT(tmp == length); } @@ -4596,9 +4595,7 @@ void Field_varstring::sort_string(char *to,uint length) (uchar*) to, length, (uchar*) ptr+HA_KEY_BLOB_LENGTH, tot_length); - if (tot_length < length) - field_charset->cset->fill(field_charset, to+tot_length,length-tot_length, - binary() ? (char) 0 : ' '); + DBUG_ASSERT(tot_length == length); } @@ -5116,10 +5113,7 @@ void Field_blob::sort_string(char *to,uint length) blob_length=my_strnxfrm(field_charset, (uchar*) to, length, (uchar*) blob, blob_length); - if (blob_length < length) - field_charset->cset->fill(field_charset, to+blob_length, - length-blob_length, - binary() ? (char) 0 : ' '); + DBUG_ASSERT(blob_length == length); } } diff --git a/sql/filesort.cc b/sql/filesort.cc index bd0de022fd4..cb377070aaa 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -622,10 +622,7 @@ static void make_sortkey(register SORTPARAM *param, } uint tmp_length=my_strnxfrm(cs,to,sort_field->length, (unsigned char *) from, length); - if (tmp_length < sort_field->length) - cs->cset->fill(cs, (char*) to+tmp_length, - sort_field->length-tmp_length, - fill_char); + DBUG_ASSERT(tmp_length == sort_field->length); } else { |