diff options
author | Michael Widenius <monty@askmonty.org> | 2010-06-23 10:33:00 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-06-23 10:33:00 +0300 |
commit | f7d6a2ed654949f662da0a8c33f8e85b6d9e7f41 (patch) | |
tree | 5fb01574f4c40c9f71e40b2a0278a66f894c73fc /storage | |
parent | 5a2f40d48a6fda6b83f788a0f849299bd44b621e (diff) | |
download | mariadb-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.cc | 6 |
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('"'); |