~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.h

  • Committer: Mark Atwood
  • Date: 2011-05-09 00:03:05 UTC
  • mfrom: (2281.4.17 prune2)
  • Revision ID: me@mark.atwood.name-20110509000305-dilr9ms7n7p1dmnk
merge lp:~olafvdspek/drizzle/prune remove tztime

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
  void copy(const std::string&, const charset_info_st*);        // Allocate new string
243
243
  void copy(const char*, size_t, const charset_info_st*); // Allocate new string
244
244
  static bool needs_conversion(size_t arg_length,
245
 
                               const charset_info_st * const cs_from, const charset_info_st * const cs_to,
 
245
                               const charset_info_st* cs_from, const charset_info_st* cs_to,
246
246
                               size_t *offset);
247
 
  bool set_or_copy_aligned(const char *s, size_t arg_length, const charset_info_st * const cs);
248
 
  bool copy(const char*s,size_t arg_length, const charset_info_st * const csfrom,
 
247
  void set_or_copy_aligned(const char *s, size_t arg_length, const charset_info_st*);
 
248
  void copy(const char*s,size_t arg_length, const charset_info_st * const csfrom,
249
249
            const charset_info_st * const csto, size_t *errors);
250
250
  void append(const String &s);
251
251
  void append(const char *s);
309
309
    return Ptr+ old_length;                     /* Area to use */
310
310
  }
311
311
 
312
 
  inline bool append(const char *s, size_t arg_length, size_t step_alloc)
 
312
  inline void append(const char *s, size_t arg_length, size_t step_alloc)
313
313
  {
314
314
    size_t new_length= arg_length + str_length;
315
 
    if (new_length > Alloced_length && realloc(new_length + step_alloc))
316
 
      return true;
 
315
    if (new_length > Alloced_length)
 
316
                        realloc(new_length + step_alloc);
317
317
    memcpy(Ptr+str_length, s, arg_length);
318
318
    str_length+= arg_length;
319
 
    return false;
320
319
  }
 
320
 
321
321
  void print(String *print);
322
322
 
323
323
  /* Swap two string objects. Efficient way to exchange data without memcpy. */