~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/compression/compress.cc

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include "config.h"
 
16
#include <config.h>
17
17
#include <drizzled/plugin/function.h>
18
18
#include <drizzled/item/func.h>
19
19
#include <drizzled/function/str/strfunc.h>
21
21
#include <drizzled/sql_error.h>
22
22
#include <drizzled/current_session.h>
23
23
#include <zlib.h>
24
 
#include "plugin/compression/compress.h"
 
24
#include <plugin/compression/compress.h>
25
25
 
26
26
#include <string>
27
27
 
58
58
  new_size= res->length() + res->length() / 5 + 12;
59
59
 
60
60
  // Check new_size overflow: new_size <= res->length()
61
 
  if (((uint32_t) (new_size+5) <= res->length()) ||
62
 
      buffer.realloc((uint32_t) new_size + 4 + 1))
 
61
  if ((uint32_t) (new_size+5) <= res->length())
63
62
  {
64
63
    null_value= 1;
65
64
    return 0;
66
65
  }
 
66
  buffer.realloc((uint32_t) new_size + 4 + 1);
67
67
 
68
68
  body= ((Byte*)buffer.ptr()) + 4;
69
69