summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorbar@gw.udmsearch.izhnet.ru <>2002-05-17 16:29:52 +0500
committerbar@gw.udmsearch.izhnet.ru <>2002-05-17 16:29:52 +0500
commit196aa19cf6624c17fb3c36c876e3e1a40f18ed23 (patch)
treee4f1191a52998c24839a96bb95784af36d1f03d0 /sql/sql_load.cc
parent7fce07d52d8411d5b97f9de12661c664b1c552b5 (diff)
downloadmariadb-git-196aa19cf6624c17fb3c36c876e3e1a40f18ed23.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/sql_load.cc')
-rw-r--r--sql/sql_load.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 419e3fccabd..faeeaf2812e 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -358,7 +358,7 @@ read_fixed_length(THD *thd,COPY_INFO &info,TABLE *table,List<Item> &fields,
field->field_length)
length=field->field_length;
save_chr=pos[length]; pos[length]='\0'; // Safeguard aganst malloc
- field->store((char*) pos,length);
+ field->store((char*) pos,length,default_charset_info);
pos[length]=save_chr;
if ((pos+=length) > read_info.row_end)
pos= read_info.row_end; /* Fills rest with space */
@@ -427,7 +427,7 @@ read_sep_field(THD *thd,COPY_INFO &info,TABLE *table,
}
field->set_notnull();
read_info.row_end[0]=0; // Safe to change end marker
- field->store((char*) read_info.row_start,length);
+ field->store((char*) read_info.row_start,length,default_charset_info);
}
if (read_info.error)
break;