~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/csv/ha_tina.h

  • Committer: Brian Aker
  • Date: 2009-12-09 01:09:43 UTC
  • mfrom: (1240.1.8 build)
  • Revision ID: brian@gaz-20091209010943-n5iq2b9ins7mx73j
Merge build

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
#define TINA_VERSION 1
33
33
 
34
 
typedef struct st_tina_share {
35
 
  char *table_name;
 
34
class TinaShare
 
35
{
 
36
  TinaShare();
 
37
  TinaShare(const TinaShare &);
 
38
  TinaShare& operator=(const TinaShare &);
 
39
public:
 
40
  explicit TinaShare(const char *name);
 
41
  ~TinaShare();
 
42
 
 
43
  std::string table_name;
36
44
  char data_file_name[FN_REFLEN];
37
 
  uint32_t table_name_length, use_count;
 
45
  uint32_t use_count;
38
46
  /*
39
47
    Here we save the length of the file for readers. This is updated by
40
48
    inserts, updates and deletes. The var is initialized along with the
50
58
  bool crashed;             /* Meta file is crashed */
51
59
  ha_rows rows_recorded;    /* Number of rows in tables */
52
60
  uint32_t data_file_version;   /* Version of the data file used */
53
 
} TINA_SHARE;
 
61
};
54
62
 
55
63
struct tina_set {
56
64
  off_t begin;
60
68
class ha_tina: public Cursor
61
69
{
62
70
  THR_LOCK_DATA lock;      /* MySQL lock */
63
 
  TINA_SHARE *share;       /* Shared lock info */
 
71
  TinaShare *share;       /* Shared lock info */
64
72
  off_t current_position;  /* Current position in the file during a file scan */
65
73
  off_t next_position;     /* Next position in the file scan */
66
74
  off_t local_saved_data_file_length; /* save position for reads */
125
133
  int rnd_next(unsigned char *buf);
126
134
  int rnd_pos(unsigned char * buf, unsigned char *pos);
127
135
  int rnd_end();
 
136
  TinaShare *get_share(const char *table_name);
 
137
  int free_share();
128
138
  int repair(Session* session, HA_CHECK_OPT* check_opt);
129
139
  /* This is required for SQL layer to know that we support autorepair */
130
140
  void position(const unsigned char *record);