~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Olaf van der Spek
  • Date: 2011-03-17 14:00:56 UTC
  • mto: (2241.2.7 refactor)
  • mto: This revision was merged to the branch mainline in revision 2245.
  • Revision ID: olafvdspek@gmail.com-20110317140056-i3cye1d6uyt5zlt1
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
#include <drizzled/ha_data.h>
76
76
#include <drizzled/diagnostics_area.h>
77
77
#include <drizzled/session/state.h>
 
78
#include <drizzled/session/property_map.h>
78
79
 
79
80
#include <algorithm>
80
81
#include <climits>
2215
2216
  impl_->life_properties.setProperty(arg, value);
2216
2217
}
2217
2218
 
2218
 
namespace display  {
2219
 
 
2220
 
static const std::string NONE= "NONE";
2221
 
static const std::string GOT_GLOBAL_READ_LOCK= "HAS GLOBAL READ LOCK";
2222
 
static const std::string MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT= "HAS GLOBAL READ LOCK WITH BLOCKING COMMIT";
2223
 
 
2224
 
const std::string &type(drizzled::Session::global_read_lock_t type)
 
2219
const std::string& display::type(drizzled::Session::global_read_lock_t type)
2225
2220
{
2226
 
  switch (type) {
 
2221
  static const std::string NONE= "NONE";
 
2222
  static const std::string GOT_GLOBAL_READ_LOCK= "HAS GLOBAL READ LOCK";
 
2223
  static const std::string MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT= "HAS GLOBAL READ LOCK WITH BLOCKING COMMIT";
 
2224
 
 
2225
  switch (type) 
 
2226
  {
2227
2227
    default:
2228
2228
    case Session::NONE:
2229
2229
      return NONE;
2234
2234
  }
2235
2235
}
2236
2236
 
2237
 
size_t max_string_length(drizzled::Session::global_read_lock_t)
 
2237
size_t display::max_string_length(drizzled::Session::global_read_lock_t)
2238
2238
{
2239
 
  return MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT.size();
 
2239
  return type(Session::MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT).size();
2240
2240
}
2241
2241
 
2242
 
} /* namespace display */
2243
 
 
2244
2242
} /* namespace drizzled */