~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • Committer: Olaf van der Spek
  • Date: 2011-05-05 11:49:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2306.
  • Revision ID: olafvdspek@gmail.com-20110505114951-tt45awrgnmkepvuf
Return void

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
** (for C functions)
119
119
*/
120
120
 
121
 
bool String::realloc(size_t alloc_length)
 
121
void String::realloc(size_t alloc_length)
122
122
{
123
123
  size_t len=ALIGN_SIZE(alloc_length+1);
124
124
  if (Alloced_length < len)
142
142
    }
143
143
  }
144
144
  Ptr[alloc_length]=0;                  // This make other funcs shorter
145
 
  return false; // return void
146
145
}
147
146
 
148
147
void String::set_int(int64_t num, bool unsigned_flag, const charset_info_st * const cs)
530
529
    (void) from->realloc(from_length);
531
530
    return from;
532
531
  }
533
 
  if (to->realloc(from_length))
534
 
    return from;                                // Actually an error
 
532
  to->realloc(from_length);
535
533
  if ((to->str_length= min(from->str_length,from_length)))
536
534
    memcpy(to->Ptr,from->Ptr,to->str_length);
537
535
  to->str_charset=from->str_charset;