~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_gearman/logging_gearman.cc

  • Committer: Stewart Smith
  • Date: 2011-01-14 05:15:23 UTC
  • mto: (2086.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2087.
  • Revision ID: stewart@flamingspork.com-20110114051523-n57f99sr3qzs9ijw
rearrange explanation of absence of old weird types in numeric data types doc to be after explanation of what we do have. I think it reads better that way

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
 
22
22
#include <boost/scoped_array.hpp>
23
23
 
24
24
#include <drizzled/plugin/logging.h>
25
25
#include <drizzled/gettext.h>
26
26
#include <drizzled/session.h>
27
 
#include <drizzled/errmsg_print.h>
28
27
#include <boost/date_time.hpp>
29
28
#include <boost/program_options.hpp>
30
29
#include <drizzled/module/option_map.h>
182
181
 
183
182
    if (gearman_client_create(&_gearman_client) == NULL)
184
183
    {
185
 
      drizzled::sql_perror(_("fail gearman_client_create()"));
 
184
      char errmsg[STRERROR_MAX];
 
185
      strerror_r(errno, errmsg, sizeof(errmsg));
 
186
      drizzled::errmsg_printf(ERRMSG_LVL_ERROR, _("fail gearman_client_create(): %s"),
 
187
                              errmsg);
186
188
      return;
187
189
    }
188
190
 
192
194
                                   host.c_str(), 0);
193
195
    if (ret != GEARMAN_SUCCESS)
194
196
    {
195
 
      drizzled::errmsg_printf(drizzled::error::ERROR, _("fail gearman_client_add_server(): %s"),
 
197
      drizzled::errmsg_printf(ERRMSG_LVL_ERROR, _("fail gearman_client_add_server(): %s"),
196
198
                              gearman_client_error(&_gearman_client));
197
199
      return;
198
200
    }
249
251
               (int)dbs->size(), dbs->c_str(),
250
252
               // do need to quote the query
251
253
               quotify((const unsigned char *)session->getQueryString()->c_str(), session->getQueryString()->length(), qs, sizeof(qs)),
252
 
               // getCommandName is defined in drizzled/sql_parse.h dont
253
 
               // need to quote the command name, always CSV safe
254
 
               (int)drizzled::getCommandName(session->command).size(),
255
 
               drizzled::getCommandName(session->command).c_str(),
 
254
               // command_name is defined in drizzled/sql_parse.cc
 
255
               // dont need to quote the command name, always CSV safe
 
256
               (int)drizzled::command_name[session->command].length,
 
257
               drizzled::command_name[session->command].str,
256
258
               // counters are at end, to make it easier to add more
257
259
               (t_mark - session->getConnectMicroseconds()),
258
260
               (session->getElapsedTime()),
262
264
               session->tmp_table,
263
265
               session->total_warn_count,
264
266
               session->getServerId(),
265
 
               drizzled::getServerHostname().c_str()
 
267
               drizzled::glob_hostname
266
268
               );
267
269
  
268
270
    char job_handle[GEARMAN_JOB_HANDLE_SIZE];