diff options
author | unknown <petr/cps@outpost.site> | 2006-12-04 18:47:16 +0300 |
---|---|---|
committer | unknown <petr/cps@outpost.site> | 2006-12-04 18:47:16 +0300 |
commit | 425183958b2e692bc6c0e79c34cf366ebc23bf6d (patch) | |
tree | a96bc60c0a192f7fb8c98959a3671e8587bcaa37 /storage/csv | |
parent | 8ffed8be8802e90637e47452c452471aa251a8f7 (diff) | |
parent | ebd5aec15e4901893711569e174cd9efbcc712e0 (diff) | |
download | mariadb-git-425183958b2e692bc6c0e79c34cf366ebc23bf6d.tar.gz |
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into outpost.site:/home/cps/mysql/trees/5.1-runtime-19044
storage/csv/ha_tina.cc:
Auto merged
Diffstat (limited to 'storage/csv')
-rw-r--r-- | storage/csv/ha_tina.cc | 6 |
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 |