~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 17:24:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326172457-vni09y22ktvvefmn
some more sprintf --> snprintf

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA */
15
15
 
16
16
/**********************************************************************
17
17
This file contains the implementation of error and warnings related
43
43
 
44
44
#include "config.h"
45
45
 
46
 
#include <cstdio>
47
46
#include <stdarg.h>
48
47
 
49
48
#include <drizzled/session.h>
65
64
*/
66
65
void DRIZZLE_ERROR::set_msg(Session *session, const char *msg_arg)
67
66
{
68
 
  msg= session->warn_root.strdup_root(msg_arg);
 
67
  msg= strdup_root(&session->warn_root, msg_arg);
69
68
}
70
69
 
71
70
/*
87
86
  if (session->getQueryId() != session->getWarningQueryId() || force)
88
87
  {
89
88
    session->setWarningQueryId(session->getQueryId());
90
 
    session->warn_root.free_root(MYF(0));
 
89
    free_root(&session->warn_root,MYF(0));
91
90
    memset(session->warn_count, 0, sizeof(session->warn_count));
92
91
    if (force)
93
92
      session->total_warn_count= 0;
134
133
 
135
134
    session->no_warnings_for_error= 1;
136
135
 
137
 
    session->setKilled(Session::KILL_BAD_DATA);
 
136
    session->killed= Session::KILL_BAD_DATA;
138
137
    my_message(code, msg, MYF(0));
139
138
 
140
139
    session->no_warnings_for_error= no_warnings_for_error;