summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-12-12 13:57:28 +0300
committerunknown <kostja@bodhi.local>2006-12-12 13:57:28 +0300
commitfabf58c6cc475e0d3837f94b5e345d8be059d248 (patch)
treee2983d5a19c729d791bd229e0032731aec15c933 /storage
parente54bbaa3fb8793905d37af808b9bee6a49df358a (diff)
parent62273f8e661c760fbb672ccb0eba80fba34f2c11 (diff)
downloadmariadb-git-fabf58c6cc475e0d3837f94b5e345d8be059d248.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime mysql-test/r/log_tables.result: Auto merged sql/handler.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/read_only.result: Manual merge. mysql-test/t/read_only.test: Manual merge. server-tools/instance-manager/guardian.cc: Manual merge.
Diffstat (limited to 'storage')
-rw-r--r--storage/csv/ha_tina.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 676bfffbc39..9f56d7db4f9 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -517,14 +517,16 @@ int ha_tina::encode_quote(byte *buf)
const char *end_ptr;
/*
- Write an empty string to the buffer in case of a NULL value.
+ CSV does not support nulls. Write quoted 0 to the buffer. In fact,
+ (*field)->val_str(&attribute,&attribute) would usually return 0
+ in this case but we write it explicitly here.
Basically this is a safety check, as no one ensures that the
field content is cleaned up every time we use Field::set_null()
in the code.
*/
if ((*field)->is_null())
{
- buffer.append(STRING_WITH_LEN("\"\","));
+ buffer.append(STRING_WITH_LEN("\"0\","));
continue;
}
else