summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbar@bar.myoffice.izhnet.ru <>2007-06-15 11:27:10 +0500
committerbar@bar.myoffice.izhnet.ru <>2007-06-15 11:27:10 +0500
commit615297df8bf96c58e05d8a9edadf232da686e362 (patch)
treec11d05480d07ceb0d7aa53c5a05ed0cb84c54cf9
parent21c233440d9679aab8fcd2efe1c0f971e80c4c57 (diff)
parentcaf85332ba6186dcfba3ad42d79959e0b0807740 (diff)
downloadmariadb-git-615297df8bf96c58e05d8a9edadf232da686e362.tar.gz
Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28862
into mysql.com:/home/bar/mysql-work/mysql-5.1.b28862
-rw-r--r--mysql-test/r/csv.result21
-rw-r--r--mysql-test/t/csv.test21
-rw-r--r--storage/csv/ha_tina.cc4
3 files changed, 44 insertions, 2 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index ede5d9a32fd..34dc1cb5b2e 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -5203,6 +5203,27 @@ select * from bug15205;
val
drop table bug15205;
drop table bug15205_2;
+set names latin1;
+create table t1 (
+c varchar(1),
+name varchar(64)
+) character set latin1 engine=csv;
+insert into t1 values (0xC0,'LATIN CAPITAL LETTER A WITH GRAVE');
+insert into t1 values (0xE0,'LATIN SMALL LETTER A WITH GRAVE');
+insert into t1 values (0xEE,'LATIN SMALL LETTER I WITH CIRCUMFLEX');
+insert into t1 values (0xFE,'LATIN SMALL LETTER THORN');
+insert into t1 values (0xF7,'DIVISION SIGN');
+insert into t1 values (0xFF,'LATIN SMALL LETTER Y WITH DIAERESIS');
+select hex(c), c, name from t1 order by 1;
+hex(c) c name
+C0 À LATIN CAPITAL LETTER A WITH GRAVE
+E0 à LATIN SMALL LETTER A WITH GRAVE
+EE î LATIN SMALL LETTER I WITH CIRCUMFLEX
+F7 ÷ DIVISION SIGN
+FE þ LATIN SMALL LETTER THORN
+FF ÿ LATIN SMALL LETTER Y WITH DIAERESIS
+drop table t1;
+End of 5.0 tests
create table bug22080_1 (id int,string varchar(64)) Engine=CSV;
create table bug22080_2 (id int,string varchar(64)) Engine=CSV;
create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 62482d576b2..c7c7f3e13ab 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1596,6 +1596,27 @@ select * from bug15205;
drop table bug15205;
drop table bug15205_2;
+
+#
+# Bug#28862 "Extended Latin1 characters get lost in CVS engine"
+#
+set names latin1;
+create table t1 (
+ c varchar(1),
+ name varchar(64)
+) character set latin1 engine=csv;
+insert into t1 values (0xC0,'LATIN CAPITAL LETTER A WITH GRAVE');
+insert into t1 values (0xE0,'LATIN SMALL LETTER A WITH GRAVE');
+insert into t1 values (0xEE,'LATIN SMALL LETTER I WITH CIRCUMFLEX');
+insert into t1 values (0xFE,'LATIN SMALL LETTER THORN');
+insert into t1 values (0xF7,'DIVISION SIGN');
+insert into t1 values (0xFF,'LATIN SMALL LETTER Y WITH DIAERESIS');
+select hex(c), c, name from t1 order by 1;
+drop table t1;
+
+--echo End of 5.0 tests
+
+
#
# Bug#22080 "CHECK fails to identify some corruption"
#
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 9eead7a059c..6de153c82d7 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -444,7 +444,7 @@ ha_tina::ha_tina(handlerton *hton, TABLE_SHARE *table_arg)
records_is_known(0)
{
/* Set our original buffers from pre-allocated memory */
- buffer.set((char*)byte_buffer, IO_SIZE, system_charset_info);
+ buffer.set((char*)byte_buffer, IO_SIZE, &my_charset_bin);
chain= chain_buffer;
file_buff= new Transparent_file();
}
@@ -679,7 +679,7 @@ int ha_tina::find_current_row(uchar *buf)
}
if (bitmap_is_set(table->read_set, (*field)->field_index))
- (*field)->store(buffer.ptr(), buffer.length(), system_charset_info);
+ (*field)->store(buffer.ptr(), buffer.length(), buffer.charset());
}
next_position= end_offset + eoln_len;
error= 0;