summaryrefslogtreecommitdiff
path: root/storage/csv/ha_tina.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-07-09 13:39:19 +0200
committerunknown <knielsen@knielsen-hq.org>2010-07-09 13:39:19 +0200
commit2be1a25faa579282b441f42e525b7e0f05fb1f5f (patch)
tree32115114a158ac13b7c806276793f537cd8eea77 /storage/csv/ha_tina.cc
parentb95bd9f5e2040609e2269772ec4ed043d0036cf4 (diff)
parentee45ab069478f532488befac0464c780c2f46f45 (diff)
downloadmariadb-git-2be1a25faa579282b441f42e525b7e0f05fb1f5f.tar.gz
Automerge MariaDB 5.1->5.2.
Diffstat (limited to 'storage/csv/ha_tina.cc')
-rw-r--r--storage/csv/ha_tina.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index ffc59140629..4ca3e029cbc 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -489,6 +489,13 @@ int ha_tina::encode_quote(uchar *buf)
ptr= attribute.ptr();
end_ptr= attribute.length() + ptr;
+ /*
+ 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('"');
while (ptr < end_ptr)