summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-06-23 10:33:00 +0300
committerMichael Widenius <monty@askmonty.org>2010-06-23 10:33:00 +0300
commitf7d6a2ed654949f662da0a8c33f8e85b6d9e7f41 (patch)
tree5fb01574f4c40c9f71e40b2a0278a66f894c73fc /storage
parent5a2f40d48a6fda6b83f788a0f849299bd44b621e (diff)
downloadmariadb-git-f7d6a2ed654949f662da0a8c33f8e85b6d9e7f41.tar.gz
Fixed trival bug introduced in last patch (buffer was not extended)
Diffstat (limited to 'storage')
-rw-r--r--storage/csv/ha_tina.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index e013440ecca..4a9754922e5 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -489,7 +489,11 @@ int ha_tina::encode_quote(uchar *buf)
ptr= attribute.ptr();
end_ptr= attribute.length() + ptr;
- if (buffer.realloc(attribute.length()*2+2))
+ /*
+ Ensure that buffer is big enough. This will also speed things up
+ as we don't have to do any new allocation in the loop below
+ */
+ if (buffer.realloc(buffer.length() + attribute.length()*2+2))
return 0; // Failure
buffer.append('"');