~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/xa_resource_manager.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 05:17:09 UTC
  • Revision ID: brian@tangent.org-20110106051709-oa0se8ur02uc6i9o
Added native functions into the function table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
  
112
112
    while ((got= resource_manager->xaRecover(trans_list, trans_len)) > 0 )
113
113
    {
114
 
      errmsg_printf(error::INFO,
 
114
      errmsg_printf(ERRMSG_LVL_INFO,
115
115
                    _("Found %d prepared transaction(s) in resource manager."),
116
116
                    got);
117
117
      for (int i=0; i < got; i ++)
174
174
  }
175
175
  if (!trans_list)
176
176
  {
177
 
    errmsg_printf(error::ERROR, ER(ER_OUTOFMEMORY), trans_len*sizeof(XID));
 
177
    errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_OUTOFMEMORY), trans_len*sizeof(XID));
178
178
    return(1);
179
179
  }
180
180
 
181
181
  if (commit_list.size())
182
 
    errmsg_printf(error::INFO, _("Starting crash recovery..."));
 
182
    errmsg_printf(ERRMSG_LVL_INFO, _("Starting crash recovery..."));
183
183
 
184
184
  XaRecover recover_func(trans_list, trans_len, commit_list, dry_run);
185
185
  std::for_each(xa_resource_managers.begin(),
188
188
  free(trans_list);
189
189
 
190
190
  if (recover_func.getForeignXIDs())
191
 
    errmsg_printf(error::WARN,
 
191
    errmsg_printf(ERRMSG_LVL_WARN,
192
192
                  _("Found %d prepared XA transactions"),
193
193
                  recover_func.getForeignXIDs());
194
 
 
195
194
  if (dry_run && recover_func.getMyXIDs())
196
195
  {
197
 
    errmsg_printf(error::ERROR,
 
196
    errmsg_printf(ERRMSG_LVL_ERROR,
198
197
                  _("Found %d prepared transactions! It means that drizzled "
199
198
                    "was not shut down properly last time and critical "
200
199
                    "recovery information (last binlog or %s file) was "
204
203
                    recover_func.getMyXIDs(), opt_tc_log_file);
205
204
    return(1);
206
205
  }
207
 
 
208
206
  if (commit_list.size())
209
 
    errmsg_printf(error::INFO, _("Crash recovery finished."));
210
 
 
 
207
    errmsg_printf(ERRMSG_LVL_INFO, _("Crash recovery finished."));
211
208
  return(0);
212
209
}
213
210