~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/diagnostics_area.h

  • Committer: Stewart Smith
  • Date: 2010-02-05 01:20:18 UTC
  • mto: (1286.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1287.
  • Revision ID: stewart@flamingspork.com-20100205012018-blvmeky20wze8eyg
initial TableProtoTester engine. We can't just use table_write as some protobuf library versions don't let us write invalid protobuf messages :(

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
20
20
#ifndef DRIZZLED_DIAGNOSTICS_AREA_H
21
21
#define DRIZZLED_DIAGNOSTICS_AREA_H
22
22
 
23
 
namespace drizzled
24
 
{
25
 
 
26
23
/**
27
24
  Stores status of the currently executed statement.
28
25
  Cleared at the beginning of the statement, and then
54
51
                     ha_rows found_rows_arg, uint64_t last_insert_id_arg,
55
52
                     const char *message);
56
53
  void set_eof_status(Session *session);
57
 
  void set_error_status(drizzled::error_t sql_errno_arg, const char *message_arg);
 
54
  void set_error_status(uint32_t sql_errno_arg, const char *message_arg);
58
55
 
59
56
  void disable_status();
60
57
 
68
65
  enum_diagnostics_status status() const { return m_status; }
69
66
 
70
67
  const char *message() const;
71
 
  drizzled::error_t sql_errno() const;
 
68
  uint32_t sql_errno() const;
72
69
  uint32_t server_status() const;
73
70
  ha_rows affected_rows() const;
74
71
  ha_rows found_rows() const;
84
81
    SQL error number. One of ER_ codes from share/errmsg.txt.
85
82
    Set by set_error_status.
86
83
  */
87
 
  drizzled::error_t m_sql_errno;
 
84
  uint32_t m_sql_errno;
88
85
 
89
86
  /**
90
87
    Copied from session->server_status when the diagnostics area is assigned.
95
92
    Assigned by OK, EOF or ERROR.
96
93
  */
97
94
  uint32_t m_server_status;
98
 
 
99
95
  /**
100
96
    The number of rows affected by the last statement. This is
101
97
    semantically close to session->row_count_func, but has a different
128
124
  */
129
125
};
130
126
 
131
 
} /* namespace drizzled */
132
 
 
133
127
#endif /* DRIZZLED_DIAGNOSTICS_AREA_H */