List:Internals« Previous MessageNext Message »
From:Jan Lindström Date:November 23 2006 2:02pm
Subject:How to print errors from commit ?
View as plain text  
Hi,

At the moment ha_commit_one_phase() is as follows:

int ha_commit_one_phase(THD *thd, bool all)
{
  int error=0;
  THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
  bool is_real_trans=all || thd->transaction.all.nht == 0;
  handlerton **ht=trans->ht;
  DBUG_ENTER("ha_commit_one_phase");
#ifdef USING_TRANSACTIONS
  if (trans->nht)
  {
    for (ht=trans->ht; *ht; ht++)
    {
      int err;
      if ((err= (*(*ht)->commit)(thd, all)))
      {
        my_error(ER_ERROR_DURING_COMMIT, MYF(0), err);
        error=1;
      }

However, I would like to see other error messages from the storage
engine after commit (e.g. duplidate key). How can I access handler
structure and call handler->print_error(...) ?

R: Jan Lindström
Solid Information Technology Ltd

Thread
How to print errors from commit ?Jan Lindström23 Nov
  • Re: How to print errors from commit ?Eric Bergen23 Nov
    • Re: How to print errors from commit ?Jan Lindström24 Nov
      • Re: How to print errors from commit ?Baron Schwartz24 Nov
        • Re: How to print errors from commit ?Jan Lindström27 Nov
          • Re: How to print errors from commit ?Brian Aker27 Nov
            • Re: How to print errors from commit ?Jan Lindström27 Nov
  • Re: How to print errors from commit ?Sergei Golubchik7 Sep