~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • 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:
167
167
    len= internal::my_gcvt(num,
168
168
                           internal::MY_GCVT_ARG_DOUBLE,
169
169
                           sizeof(buff) - 1, buff, NULL);
170
 
    return copy(buff, len, &my_charset_utf8_general_ci, cs, &dummy_errors);
 
170
    copy(buff, len, &my_charset_utf8_general_ci, cs, &dummy_errors);
 
171
                return false; // return void
171
172
  }
172
173
  len= internal::my_fcvt(num, decimals, buff, NULL);
173
 
  return copy(buff, (size_t) len, &my_charset_utf8_general_ci, cs,
174
 
              &dummy_errors);
 
174
  copy(buff, (size_t) len, &my_charset_utf8_general_ci, cs, &dummy_errors);
 
175
        return false;
175
176
}
176
177
 
177
178
 
204
205
  str_charset= cs;
205
206
}
206
207
 
207
 
void String::copy(const char *str,size_t arg_length, const charset_info_st * const cs)
 
208
void String::copy(const char *str,size_t arg_length, const charset_info_st* cs)
208
209
{
209
210
  alloc(arg_length);
210
211
  if ((str_length=arg_length))
254
255
 
255
256
 
256
257
 
257
 
bool String::set_or_copy_aligned(const char *str,size_t arg_length,
258
 
                                 const charset_info_st * const cs)
 
258
void String::set_or_copy_aligned(const char *str,size_t arg_length, const charset_info_st* cs)
259
259
{
260
260
  /* How many bytes are in incomplete character */
261
261
  size_t offset= (arg_length % cs->mbminlen);
263
263
  assert(!offset); /* All characters are complete, just copy */
264
264
 
265
265
  set(str, arg_length, cs);
266
 
  return false;
267
266
}
268
267
 
269
268
        /* Copy with charset conversion */
270
269
 
271
 
bool String::copy(const char *str, size_t arg_length,
272
 
                          const charset_info_st * const,
273
 
                                  const charset_info_st * const to_cs, size_t *errors)
 
270
void String::copy(const char *str, size_t arg_length,
 
271
                          const charset_info_st*,
 
272
                                  const charset_info_st* to_cs, size_t *errors)
274
273
{
275
 
  *errors= 0;
 
274
  *errors= 0; // remove param
276
275
  copy(str, arg_length, to_cs);
277
 
  return false; // return void
278
276
}
279
277
 
280
278
 
305
303
    return 0;
306
304
  }
307
305
  size_t dummy_errors;
308
 
  return copy(str, arg_length, &my_charset_utf8_general_ci, str_charset, &dummy_errors);
 
306
  copy(str, arg_length, &my_charset_utf8_general_ci, str_charset, &dummy_errors);
 
307
        return false;
309
308
}
310
309
 
311
310
void String::append(const String &s)