~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/status_helper.cc

  • Committer: lbieber
  • Date: 2010-10-05 22:23:12 UTC
  • mfrom: (1813.1.4 build)
  • Revision ID: lbieber@orisndriz08-20101005222312-weuq0ardk3gcryau
Merge Travis - 621861 - convert structs to classes
Merge Billy - 621331 - Replace use of stringstream with boost::lexical_cast
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle
Merge Andrew - fix bug 653300 - Syntax error on inport of a SQL file produced by drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include "config.h"
 
22
#include <boost/lexical_cast.hpp>
22
23
#include "status_helper.h"
23
24
#include "drizzled/set_var.h"
24
25
#include "drizzled/drizzled.h"
77
78
    value= ((char *) status_var + (ulong) value);
78
79
    /* fall through */
79
80
  case SHOW_LONG:
80
 
    oss << *(long*) value;
81
 
    return_value= oss.str();
 
81
    return_value=boost::lexical_cast<std::string>(*(long*) value);
82
82
    break;
83
83
  case SHOW_LONGLONG_STATUS:
84
84
    value= ((char *) status_var + (uint64_t) value);
85
85
    /* fall through */
86
86
  case SHOW_LONGLONG:
87
 
    oss << *(int64_t*) value;
88
 
    return_value= oss.str();
 
87
    return_value=boost::lexical_cast<std::string>(*(int64_t*) value);
89
88
    break;
90
89
  case SHOW_SIZE:
91
 
    oss << *(size_t*) value;
92
 
    return_value= oss.str();
 
90
    return_value=boost::lexical_cast<std::string>(*(size_t*) value);
93
91
    break;
94
92
  case SHOW_HA_ROWS:
95
 
    oss << (int64_t) *(ha_rows*) value;
96
 
    return_value= oss.str();
 
93
    return_value=boost::lexical_cast<std::string>((int64_t) *(ha_rows*) value);
97
94
    break;
98
95
  case SHOW_BOOL:
99
96
  case SHOW_MY_BOOL:
101
98
    break;
102
99
  case SHOW_INT:
103
100
  case SHOW_INT_NOFLUSH: // the difference lies in refresh_status()
104
 
    oss << (long) *(uint32_t*) value;
105
 
    return_value= oss.str();
 
101
    return_value=boost::lexical_cast<std::string>((long) *(uint32_t*) value);
106
102
    break;
107
103
  case SHOW_CHAR:
108
104
    {