~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rollback_to_savepoint.cc

  • Committer: Mark Atwood
  • Date: 2011-10-13 18:28:03 UTC
  • mfrom: (2433.1.5 rf1)
  • Revision ID: me@mark.atwood.name-20111013182803-pbmb3r5emfxfrbvy
mergeĀ lp:~olafvdspek/drizzle/refactor2

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
  /* Short-circuit for no savepoints */
70
70
  if (savepoints.empty())
71
71
  {
72
 
    my_error(ER_SP_DOES_NOT_EXIST, 
73
 
             MYF(0), 
74
 
             "SAVEPOINT", 
75
 
             lex().ident.str);
 
72
    my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "SAVEPOINT", lex().ident.data());
76
73
    return false;
77
74
  }
78
75
 
81
78
    NamedSavepoint &first_savepoint= savepoints.front();
82
79
    const string &first_savepoint_name= first_savepoint.getName();
83
80
    if (my_strnncoll(system_charset_info,
84
 
                     (unsigned char *) lex().ident.str, 
85
 
                     lex().ident.length,
 
81
                     (unsigned char *) lex().ident.data(), 
 
82
                     lex().ident.size(),
86
83
                     (unsigned char *) first_savepoint_name.c_str(), 
87
84
                     first_savepoint_name.size()) == 0)
88
85
    {
117
114
    const string &sv_name= sv.getName();
118
115
    if (! found && 
119
116
        my_strnncoll(system_charset_info,
120
 
                     (unsigned char *) lex().ident.str, 
121
 
                     lex().ident.length,
 
117
                     (unsigned char *) lex().ident.data(), 
 
118
                     lex().ident.size(),
122
119
                     (unsigned char *) sv_name.c_str(), 
123
120
                     sv_name.size()) == 0)
124
121
    {
155
152
  {
156
153
    /* restore the original savepoint list */
157
154
    transaction().savepoints= copy_savepoints;
158
 
    my_error(ER_SP_DOES_NOT_EXIST, 
159
 
             MYF(0), 
160
 
             "SAVEPOINT", 
161
 
             lex().ident.str);
 
155
    my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "SAVEPOINT", lex().ident.data());
162
156
  }
163
157
  return false;
164
158
}