65
65
static st_show_var_func_container show_connection_count_cont_new= { &show_connection_count_new };
67
string StatusHelper::fillHelper(system_status_var *status_var, char *value, SHOW_TYPE show_type)
67
string StatusHelper::fillHelper(system_status_var *status_var, const char *value, SHOW_TYPE show_type)
73
72
case SHOW_DOUBLE_STATUS:
74
73
value= ((char *) status_var + (ulong) value);
78
77
oss << *(double *) value;
79
return_value= oss.str();
81
79
case SHOW_LONG_STATUS:
82
80
value= ((char *) status_var + (ulong) value);
85
return_value=boost::lexical_cast<std::string>(*(long*) value);
83
return boost::lexical_cast<std::string>(*(long*) value);
87
85
case SHOW_LONGLONG_STATUS:
88
86
value= ((char *) status_var + (uint64_t) value);
90
88
case SHOW_LONGLONG:
91
return_value=boost::lexical_cast<std::string>(*(int64_t*) value);
89
return boost::lexical_cast<std::string>(*(int64_t*) value);
94
return_value=boost::lexical_cast<std::string>(*(size_t*) value);
91
return boost::lexical_cast<std::string>(*(size_t*) value);
97
return_value=boost::lexical_cast<std::string>((int64_t) *(ha_rows*) value);
93
return boost::lexical_cast<std::string>((int64_t) *(ha_rows*) value);
100
95
case SHOW_MY_BOOL:
101
return_value= *(bool*) value ? "ON" : "OFF";
96
return *(bool*) value ? "ON" : "OFF";
104
98
case SHOW_INT_NOFLUSH: // the difference lies in refresh_status()
105
return_value=boost::lexical_cast<std::string>((long) *(uint32_t*) value);
99
return boost::lexical_cast<std::string>((long) *(uint32_t*) value);
113
104
case SHOW_CHAR_PTR:
116
return_value= *(char**) value;
106
return *(char**) value;
121
109
break; // Return empty string
122
110
case SHOW_SYS: // Cannot happen
131
117
drizzle_show_var StatusHelper::status_vars_defs[]=