mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
A fix for a charset bug in the select_export (select into
outfile) class.
This commit is contained in:
@ -22,7 +22,7 @@
|
|||||||
#select load_file("/tmp/select-test.not-exist");
|
#select load_file("/tmp/select-test.not-exist");
|
||||||
#drop table t1;
|
#drop table t1;
|
||||||
#drop table if exists t;
|
#drop table if exists t;
|
||||||
#CREATE TABLE t ( t timestamp NOT NULL, c char(200) character set latin1 NOT NULL default '', KEY t (t)) TYPE=MyISAM;
|
#CREATE TABLE t ( t timestamp NOT NULL, c char(200) character set latin1 NOT NULL default '', i int(11), v varchar(200), b blob, KEY t (t)) TYPE=MyISAM;
|
||||||
#INSERT INTO t VALUES ('2002-12-20 12:01:20','');
|
#INSERT INTO t VALUES ('2002-12-20 12:01:20','',1,"aaa","bbb");
|
||||||
#select * from t into outfile "fdg";
|
#select * from t into outfile "check";
|
||||||
#drop table if exists t;
|
#drop table if exists t;
|
||||||
|
@ -2844,7 +2844,6 @@ String *Field_timestamp::val_str(String *val_buffer,
|
|||||||
val_buffer->alloc(field_length+1);
|
val_buffer->alloc(field_length+1);
|
||||||
char *to=(char*) val_buffer->ptr(),*end=to+field_length;
|
char *to=(char*) val_buffer->ptr(),*end=to+field_length;
|
||||||
val_buffer->length(field_length);
|
val_buffer->length(field_length);
|
||||||
val_buffer->set_charset(val_ptr->charset());
|
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
if (table->db_low_byte_first)
|
if (table->db_low_byte_first)
|
||||||
|
@ -220,6 +220,7 @@ String *Item_field::str_result(String *str)
|
|||||||
{
|
{
|
||||||
if ((null_value=result_field->is_null()))
|
if ((null_value=result_field->is_null()))
|
||||||
return 0;
|
return 0;
|
||||||
|
str->set_charset(str_value.charset());
|
||||||
return result_field->val_str(str,&str_value);
|
return result_field->val_str(str,&str_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user