~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.cc

  • Committer: Stewart Smith
  • Date: 2009-10-08 12:39:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1179.
  • Revision ID: stewart@flamingspork.com-20091008123927-qpf9hog04w4xc5aj
make directory_file_name() static to mysys/my_lib.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
***********************************************************************/
43
43
 
44
 
#include "config.h"
45
 
 
46
 
#include <stdarg.h>
47
 
 
 
44
#include <drizzled/server_includes.h>
48
45
#include <drizzled/session.h>
49
46
#include <drizzled/sql_base.h>
50
47
#include <drizzled/item/empty_string.h>
51
48
#include <drizzled/item/return_int.h>
52
49
#include <drizzled/plugin/client.h>
53
50
 
54
 
using namespace std;
55
 
 
56
 
namespace drizzled
57
 
{
 
51
using namespace drizzled;
58
52
 
59
53
/*
60
54
  Store a new message in an error object
83
77
 
84
78
void drizzle_reset_errors(Session *session, bool force)
85
79
{
86
 
  if (session->getQueryId() != session->getWarningQueryId() || force)
 
80
  if (session->query_id != session->warn_id || force)
87
81
  {
88
 
    session->setWarningQueryId(session->getQueryId());
 
82
    session->warn_id= session->query_id;
89
83
    free_root(&session->warn_root,MYF(0));
90
84
    memset(session->warn_count, 0, sizeof(session->warn_count));
91
85
    if (force)
120
114
      !(session->options & OPTION_SQL_NOTES))
121
115
    return(0);
122
116
 
123
 
  if (session->getQueryId() != session->getWarningQueryId())
 
117
  if (session->query_id != session->warn_id)
124
118
    drizzle_reset_errors(session, 0);
125
119
  session->got_warning= 1;
126
120
 
243
237
  session->my_eof();
244
238
  return(false);
245
239
}
246
 
 
247
 
} /* namespace drizzled */