diff options
author | unknown <bar@gw.udmsearch.izhnet.ru> | 2002-05-17 16:29:52 +0500 |
---|---|---|
committer | unknown <bar@gw.udmsearch.izhnet.ru> | 2002-05-17 16:29:52 +0500 |
commit | f1071a0e73afe92f02f77b6898b64710258a491e (patch) | |
tree | e4f1191a52998c24839a96bb95784af36d1f03d0 /sql/unireg.cc | |
parent | cfec726c4daf5cbf69107b4a04d4f0fb4cd798c1 (diff) | |
download | mariadb-git-f1071a0e73afe92f02f77b6898b64710258a491e.tar.gz |
Now string values are created and filled with charset field
SELECT func(charset2) FROM t ORDER BY 1 works in correct charset
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index 1c35f7a6a08..16f51658313 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -484,7 +484,7 @@ static bool pack_fields(File file,List<create_field> &create_fields) /* Write intervals */ if (int_count) { - String tmp((char*) buff,sizeof(buff)); + String tmp((char*) buff,sizeof(buff), default_charset_info); tmp.length(0); it.rewind(); int_count=0; @@ -561,6 +561,7 @@ static bool make_empty_rec(File file,enum db_type table_type, field->interval, field->field_name, &table); + if (!(field->flags & NOT_NULL_FLAG)) null_count++; @@ -581,9 +582,9 @@ static bool make_empty_rec(File file,enum db_type table_type, regfield->store((longlong) 1); } else if (type == Field::YES) // Old unireg type - regfield->store(ER(ER_YES),(uint) strlen(ER(ER_YES))); + regfield->store(ER(ER_YES),(uint) strlen(ER(ER_YES)),default_charset_info); else if (type == Field::NO) // Old unireg type - regfield->store(ER(ER_NO), (uint) strlen(ER(ER_NO))); + regfield->store(ER(ER_NO), (uint) strlen(ER(ER_NO)),default_charset_info); else regfield->reset(); delete regfield; |