~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/num.cc

  • Committer: Mark Atwood
  • Date: 2011-07-13 22:28:29 UTC
  • mfrom: (2318.7.25 refactor1)
  • Revision ID: me@mark.atwood.name-20110713222829-sswp061b5ts7tc1k
mergeĀ lp:~olafvdspek/drizzle/refactor1

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/item/string.h>
25
25
#include <drizzled/item/decimal.h>
26
26
 
27
 
namespace drizzled
28
 
{
 
27
namespace drizzled {
29
28
 
30
29
/**
31
30
  @details
38
37
  the latter returns a non-fixed Item, so val_str() crashes afterwards.
39
38
  Override Item_num method, to return a fixed item.
40
39
*/
41
 
Item *Item_num::safe_charset_converter(const charset_info_st * const)
 
40
Item *Item_num::safe_charset_converter(const charset_info_st*)
42
41
{
43
 
  Item_string *conv;
44
42
  char buf[64];
45
 
  String *s, tmp(buf, sizeof(buf), &my_charset_bin);
46
 
  s= val_str(&tmp);
47
 
  conv= new Item_string(s->ptr(), s->length(), s->charset());
 
43
  String tmp(buf, sizeof(buf), &my_charset_bin);
 
44
  String* s= val_str(&tmp);
 
45
  Item_string* conv= new Item_string(s->ptr(), s->length(), s->charset());
48
46
  conv->str_value.copy();
49
47
  conv->str_value.mark_as_const();
50
48
  return conv;