~patrick-crews/drizzle/qp-merge2

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Patrick Crews
  • Date: 2012-02-20 22:04:21 UTC
  • mfrom: (2483.1.30 drizzle)
  • Revision ID: gleebix@gmail.com-20120220220421-9a77n2wnglo211r0
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
  assert(not cleanup_done);
391
391
 
392
392
  setKilled(KILL_CONNECTION);
393
 
#ifdef ENABLE_WHEN_BINLOG_WILL_BE_ABLE_TO_PREPARE
394
 
  if (transaction.xid_state.xa_state == XA_PREPARED)
395
 
  {
396
 
#error xid_state in the cache should be replaced by the allocated value
397
 
  }
398
 
#endif
399
 
  {
400
 
    TransactionServices::rollbackTransaction(*this, true);
401
 
  }
 
393
 
 
394
  /* In the future, you may want to do something about XA_PREPARED here.
 
395
     In the dim distant past there was some #ifdefed out #error here about it.
 
396
  */
 
397
  TransactionServices::rollbackTransaction(*this, true);
402
398
 
403
399
  BOOST_FOREACH(UserVars::reference iter, user_vars)
404
400
    boost::checked_delete(iter.second);
1747
1743
 
1748
1744
  if (open_tables.lock)
1749
1745
  {
1750
 
    /*
1751
 
      For RBR we flush the pending event just before we unlock all the
1752
 
      tables.  This means that we are at the end of a topmost
1753
 
      statement, so we ensure that the STMT_END_F flag is set on the
1754
 
      pending event.  For statements that are *inside* stored
1755
 
      functions, the pending event will not be flushed: that will be
1756
 
      handled either before writing a query log event (inside
1757
 
      binlog_query()) or when preparing a pending event.
1758
 
     */
1759
1746
    unlockTables(open_tables.lock);
1760
1747
    open_tables.lock= 0;
1761
1748
  }