~ubuntu-branches/ubuntu/raring/mysql-5.5/raring-proposed

« back to all changes in this revision

Viewing changes to sql/sp_rcontext.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-16 08:29:25 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130116082925-znscu5xswxo6pmw2
Tags: 5.5.29-0ubuntu1
* SECURITY UPDATE: Update to 5.5.29 to fix security issues (LP: #1100264)
  - http://www.oracle.com/technetwork/topics/security/cpujan2013-1515902.html
* debian/patches/CVE-2012-5611.patch: removed, included upstream.
* debian/patches/38_scripts__mysqld_safe.sh__signals.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  uint index;
59
59
} sp_active_handler_t;
60
60
 
 
61
 
 
62
class Sql_condition_info : public Sql_alloc
 
63
{
 
64
public:
 
65
  /** SQL error code. */
 
66
  uint m_sql_errno;
 
67
 
 
68
  /** Error level. */
 
69
  MYSQL_ERROR::enum_warning_level m_level;
 
70
 
 
71
  /** SQLSTATE. */
 
72
  char m_sql_state[SQLSTATE_LENGTH + 1];
 
73
 
 
74
  /** Text message. */
 
75
  char m_message[MYSQL_ERRMSG_SIZE];
 
76
 
 
77
  void set(uint sql_errno, const char* sqlstate,
 
78
           MYSQL_ERROR::enum_warning_level level,
 
79
           const char* msg)
 
80
  {
 
81
    m_sql_errno= sql_errno;
 
82
    m_level= level;
 
83
 
 
84
    memcpy(m_sql_state, sqlstate, SQLSTATE_LENGTH);
 
85
    m_sql_state[SQLSTATE_LENGTH]= '\0';
 
86
 
 
87
    strncpy(m_message, msg, MYSQL_ERRMSG_SIZE);
 
88
  }
 
89
 
 
90
  void clear()
 
91
  {
 
92
    m_sql_errno= 0;
 
93
    m_level= MYSQL_ERROR::WARN_LEVEL_ERROR;
 
94
 
 
95
    m_sql_state[0]= '\0';
 
96
    m_message[0]= '\0';
 
97
  }
 
98
};
 
99
 
 
100
 
61
101
/*
62
102
  This class is a runtime context of a Stored Routine. It is used in an
63
103
  execution and is intended to contain all dynamic objects (i.e.  objects, which
146
186
               MYSQL_ERROR::enum_warning_level level,
147
187
               const char *msg);
148
188
 
149
 
  MYSQL_ERROR *
150
 
  raised_condition() const;
 
189
  Sql_condition_info *raised_condition() const;
151
190
 
152
191
  void
153
192
  push_hstack(uint h);
232
271
    SQL conditions caught by each handler.
233
272
    This is an array indexed by handler index.
234
273
  */
235
 
  MYSQL_ERROR *m_raised_conditions;
 
274
  Sql_condition_info *m_raised_conditions;
236
275
 
237
276
  uint m_hcount;                // Stack pointer for m_handler
238
277
  uint *m_hstack;               // Return stack for continue handlers