~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.cc

MergedĀ build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#include <drizzled/plugin/client.h>
53
53
 
54
54
using namespace std;
55
 
using namespace drizzled;
 
55
 
 
56
namespace drizzled
 
57
{
56
58
 
57
59
/*
58
60
  Store a new message in an error object
81
83
 
82
84
void drizzle_reset_errors(Session *session, bool force)
83
85
{
84
 
  if (session->query_id != session->warn_id || force)
 
86
  if (session->getQueryId() != session->getWarningQueryId() || force)
85
87
  {
86
 
    session->warn_id= session->query_id;
 
88
    session->setWarningQueryId(session->getQueryId());
87
89
    free_root(&session->warn_root,MYF(0));
88
90
    memset(session->warn_count, 0, sizeof(session->warn_count));
89
91
    if (force)
118
120
      !(session->options & OPTION_SQL_NOTES))
119
121
    return(0);
120
122
 
121
 
  if (session->query_id != session->warn_id)
 
123
  if (session->getQueryId() != session->getWarningQueryId())
122
124
    drizzle_reset_errors(session, 0);
123
125
  session->got_warning= 1;
124
126
 
241
243
  session->my_eof();
242
244
  return(false);
243
245
}
 
246
 
 
247
} /* namespace drizzled */