~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2010-10-15 05:30:39 UTC
  • mfrom: (1843.8.7 trunk-drizzle)
  • Revision ID: brian@tangent.org-20101015053039-ebmv3hnn1yaq4wqy
Merge in refactoring on table (broken it up by type, this will allow me to
insert the new locking).

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include "drizzled/transaction_services.h"
49
49
#include "drizzled/drizzled.h"
50
50
 
51
 
#include "drizzled/table_share_instance.h"
 
51
#include "drizzled/table/instance.h"
52
52
 
53
53
#include "plugin/myisam/myisam.h"
54
54
#include "drizzled/internal/iocache.h"
55
55
#include "drizzled/internal/thread_var.h"
56
56
#include "drizzled/plugin/event_observer.h"
57
57
 
 
58
#include "drizzled/util/functors.h"
 
59
 
58
60
#include <fcntl.h>
59
61
#include <algorithm>
60
62
#include <climits>
562
564
    // We should do something about an error...
563
565
  }
564
566
 
 
567
  if (unlikely(plugin::EventObserver::connectSession(*this)))
 
568
  {
 
569
    // We should do something about an error...
 
570
  }
 
571
 
565
572
  if (scheduler->addSession(this))
566
573
  {
567
574
    DRIZZLE_CONNECTION_START(thread_id);
827
834
  where= Session::DEFAULT_WHERE;
828
835
 
829
836
  /* Reset the temporary shares we built */
830
 
  for (std::vector<TableShareInstance *>::iterator iter= temporary_shares.begin();
831
 
       iter != temporary_shares.end(); iter++)
832
 
  {
833
 
    delete *iter;
834
 
  }
 
837
  for_each(temporary_shares.begin(),
 
838
           temporary_shares.end(),
 
839
           DeletePtr());
835
840
  temporary_shares.clear();
836
841
}
837
842
 
2052
2057
  return true;
2053
2058
}
2054
2059
 
2055
 
TableShareInstance *Session::getTemporaryShare(TableIdentifier::Type type_arg)
 
2060
table::Instance *Session::getInstanceTable()
2056
2061
{
2057
 
  temporary_shares.push_back(new TableShareInstance(type_arg)); // This will not go into the tableshare cache, so no key is used.
 
2062
  temporary_shares.push_back(new table::Instance()); // This will not go into the tableshare cache, so no key is used.
2058
2063
 
2059
 
  TableShareInstance *tmp_share= temporary_shares.back();
 
2064
  table::Instance *tmp_share= temporary_shares.back();
2060
2065
 
2061
2066
  assert(tmp_share);
2062
2067