~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definition/table.h

  • Committer: Lee Bieber
  • Date: 2010-11-20 23:45:43 UTC
  • mfrom: (1938.4.8 trunk)
  • Revision ID: kalebral@gmail.com-20101120234543-xe4uzonpjsk08cr6
Merge Brian - refactor share

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "drizzled/util/string.h"
40
40
 
41
41
#include "drizzled/table/cache.h"
42
 
#include "drizzled/definition/cache.h"
43
42
 
44
43
namespace drizzled
45
44
{
46
45
 
47
46
extern uint64_t refresh_version;
48
47
 
49
 
typedef boost::shared_ptr<TableShare> TableSharePtr;
50
 
 
51
48
const static std::string STANDARD_STRING("STANDARD");
52
49
const static std::string TEMPORARY_STRING("TEMPORARY");
53
50
const static std::string INTERNAL_STRING("INTERNAL");
64
61
class TableShare
65
62
{
66
63
  typedef std::vector<std::string> StringVector;
 
64
 
67
65
public:
 
66
  typedef boost::shared_ptr<TableShare> shared_ptr;
 
67
  typedef std::vector <shared_ptr> vector;
 
68
 
68
69
  TableShare(TableIdentifier::Type type_arg);
69
70
 
70
71
  TableShare(TableIdentifier &identifier, const TableIdentifier::Key &key); // Used by placeholder
500
501
    unlock();
501
502
  }
502
503
 
503
 
  uint32_t decrementTableCount()
504
 
  {
505
 
    return --ref_count;
506
 
  }
507
 
 
508
504
  uint32_t null_bytes;
509
505
  uint32_t last_null_bit_pos;
510
506
  uint32_t fields;                              /* Number of fields */
633
629
  void open_table_error(int pass_error, int db_errno, int pass_errarg);
634
630
 
635
631
  static void release(TableShare *share);
636
 
  static void release(TableSharePtr &share);
 
632
  static void release(TableShare::shared_ptr &share);
637
633
  static void release(TableIdentifier &identifier);
638
 
  static TableSharePtr getShare(TableIdentifier &identifier);
639
 
  static TableSharePtr getShareCreate(Session *session, 
640
 
                                      TableIdentifier &identifier,
641
 
                                      int &error);
 
634
  static TableShare::shared_ptr getShareCreate(Session *session, 
 
635
                                               TableIdentifier &identifier,
 
636
                                               int &error);
642
637
 
643
638
  friend std::ostream& operator<<(std::ostream& output, const TableShare &share)
644
639
  {