~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

Merge in trunk to catalogs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#include "drizzled/diagnostics_area.h"
54
54
#include "drizzled/plugin/authorization.h"
55
55
 
 
56
#include "drizzled/catalog/instance.h"
 
57
#include "drizzled/catalog/local.h"
 
58
 
56
59
#include <boost/unordered_map.hpp>
57
60
 
58
61
#include <boost/thread/thread.hpp>
310
313
 * all member variables that are not critical to non-internal operations of the
311
314
 * session object.
312
315
 */
313
 
typedef int64_t session_id_t;
314
316
 
315
317
class Session : public Open_tables_state
316
318
{
324
326
  typedef const Session* const_pointer;
325
327
  typedef Session* pointer;
326
328
 
 
329
  static shared_ptr make_shared(plugin::Client *client, catalog::Instance::shared_ptr instance_arg)
 
330
  {
 
331
    assert(instance_arg);
 
332
    return boost::make_shared<Session>(client, instance_arg);
 
333
  }
 
334
 
327
335
  /*
328
336
    MARK_COLUMNS_NONE:  Means mark_used_colums is not set and no indicator to
329
337
                        handler of fields used is set
521
529
 
522
530
    return util::string::const_shared_ptr(new std::string(""));
523
531
  }
524
 
  std::string catalog;
 
532
 
525
533
  /* current cache key */
526
534
  std::string query_cache_key;
527
535
  /**
1148
1156
    auto_inc_intervals_forced.append(next_id, UINT64_MAX, 0);
1149
1157
  }
1150
1158
 
1151
 
  Session(plugin::Client *client_arg);
 
1159
  Session(plugin::Client *client_arg, catalog::Instance::shared_ptr catalog);
1152
1160
  virtual ~Session();
1153
1161
 
1154
1162
  void cleanup(void);
1863
1871
    return usage;
1864
1872
  }
1865
1873
 
 
1874
  catalog::Instance::const_pointer catalog() const
 
1875
  {
 
1876
    return _catalog.get();
 
1877
  }
 
1878
 
1866
1879
private:
 
1880
  catalog::Instance::shared_ptr _catalog;
 
1881
 
1867
1882
  // This lives throughout the life of Session
1868
1883
  bool use_usage;
1869
1884
  PropertyMap life_properties;