~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

Style cleanup around TransactionContext::modified_non_trans_table and dead code removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
257
257
  else
258
258
    options &= ~OPTION_BIG_SELECTS;
259
259
 
260
 
  transaction.all.modified_non_trans_table= transaction.stmt.modified_non_trans_table= false;
261
260
  open_options=ha_open_options;
262
261
  update_lock_default= TL_WRITE;
263
262
  session_tx_isolation= (enum_tx_isolation) variables.tx_isolation;
793
792
      if (transaction_services.ha_commit_trans(this, true))
794
793
        result= false;
795
794
      options&= ~(OPTION_BEGIN);
796
 
      transaction.all.modified_non_trans_table= false;
797
795
      break;
798
796
    case COMMIT_RELEASE:
799
797
      do_release= 1; /* fall through */
811
809
      if (transaction_services.ha_rollback_trans(this, true))
812
810
        result= false;
813
811
      options&= ~(OPTION_BEGIN);
814
 
      transaction.all.modified_non_trans_table= false;
815
812
      if (result == true && (completion == ROLLBACK_AND_CHAIN))
816
813
        result= startTransaction();
817
814
      break;
846
843
      result= false;
847
844
  }
848
845
  options&= ~(OPTION_BEGIN);
849
 
  transaction.all.modified_non_trans_table= false;
850
846
  return result;
851
847
}
852
848
 
1697
1693
 
1698
1694
int session_non_transactional_update(const Session *session)
1699
1695
{
1700
 
  return(session->transaction.all.modified_non_trans_table);
 
1696
  return(session->transaction.all.hasModifiedNonTransData());
1701
1697
}
1702
1698
 
1703
1699
void session_mark_transaction_to_rollback(Session *session, bool all)
1775
1771
  server_status&= ~ (SERVER_MORE_RESULTS_EXISTS |
1776
1772
                          SERVER_QUERY_NO_INDEX_USED |
1777
1773
                          SERVER_QUERY_NO_GOOD_INDEX_USED);
1778
 
  /*
1779
 
    If in autocommit mode and not in a transaction, reset
1780
 
    OPTION_STATUS_NO_TRANS_UPDATE to not get warnings
1781
 
    in ha_rollback_trans() about some tables couldn't be rolled back.
1782
 
  */
1783
 
  if (!(options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
1784
 
  {
1785
 
    transaction.all.modified_non_trans_table= false;
1786
 
  }
1787
1774
 
1788
1775
  clear_error();
1789
1776
  main_da.reset_diagnostics_area();