~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2009-11-04 16:17:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1207.
  • Revision ID: brian@gaz-20091104161749-z39eqefcb0rxc61z
Valgrind fix for startTransaction()

Show diffs side-by-side

added added

removed removed

Lines of Context:
841
841
  return result;
842
842
}
843
843
 
844
 
bool Session::startTransaction()
 
844
bool Session::startTransaction(start_transaction_option_t opt)
845
845
{
846
846
  bool result= true;
847
847
 
848
848
  if (! endActiveTransaction())
 
849
  {
849
850
    result= false;
 
851
  }
850
852
  else
851
853
  {
852
854
    options|= OPTION_BEGIN;
853
855
    server_status|= SERVER_STATUS_IN_TRANS;
854
 
    if (lex->start_transaction_opt & DRIZZLE_START_TRANS_OPT_WITH_CONS_SNAPSHOT)
 
856
 
 
857
    if (opt == START_TRANS_OPT_WITH_CONS_SNAPSHOT)
 
858
    {
 
859
      // TODO make this a loop for all engines, not just this one (Inno only
 
860
      // right now)
855
861
      if (plugin::StorageEngine::startConsistentSnapshot(this))
 
862
      {
856
863
        result= false;
 
864
      }
 
865
    }
857
866
  }
 
867
 
858
868
  return result;
859
869
}
860
870