~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/blackhole/ha_blackhole.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#pragma implementation                          // gcc: Class implementation
19
19
#endif
20
20
 
21
 
#include "mysql_priv.h"
 
21
#include <drizzled/mysql_priv.h>
22
22
#include "ha_blackhole.h"
23
23
 
24
24
/* Static declarations for handlerton */
58
58
  return ha_blackhole_exts;
59
59
}
60
60
 
61
 
int ha_blackhole::open(const char *name, int mode __attribute__((__unused__)),
62
 
                       uint test_if_locked __attribute__((__unused__)))
 
61
int ha_blackhole::open(const char *name, int mode __attribute__((unused)),
 
62
                       uint test_if_locked __attribute__((unused)))
63
63
{
64
64
  if (!(share= get_share(name)))
65
65
    return(HA_ERR_OUT_OF_MEM);
74
74
  return(0);
75
75
}
76
76
 
77
 
int ha_blackhole::create(const char *name __attribute__((__unused__)),
78
 
                         TABLE *table_arg __attribute__((__unused__)),
79
 
                         HA_CREATE_INFO *create_info __attribute__((__unused__)))
 
77
int ha_blackhole::create(const char *name __attribute__((unused)),
 
78
                         TABLE *table_arg __attribute__((unused)),
 
79
                         HA_CREATE_INFO *create_info __attribute__((unused)))
80
80
{
81
81
  return(0);
82
82
}
91
91
               HA_KEY_ALG_RTREE) ? "RTREE" : "BTREE");
92
92
}
93
93
 
94
 
int ha_blackhole::write_row(uchar * buf __attribute__((__unused__)))
 
94
int ha_blackhole::write_row(uchar * buf __attribute__((unused)))
95
95
{
96
96
  return(table->next_number_field ? update_auto_increment() : 0);
97
97
}
98
98
 
99
 
int ha_blackhole::rnd_init(bool scan __attribute__((__unused__)))
 
99
int ha_blackhole::rnd_init(bool scan __attribute__((unused)))
100
100
{
101
101
  return(0);
102
102
}
103
103
 
104
104
 
105
 
int ha_blackhole::rnd_next(uchar *buf __attribute__((__unused__)))
 
105
int ha_blackhole::rnd_next(uchar *buf __attribute__((unused)))
106
106
{
107
107
  return(HA_ERR_END_OF_FILE);
108
108
}
109
109
 
110
110
 
111
 
int ha_blackhole::rnd_pos(uchar * buf __attribute__((__unused__)),
112
 
                          uchar *pos __attribute__((__unused__)))
 
111
int ha_blackhole::rnd_pos(uchar * buf __attribute__((unused)),
 
112
                          uchar *pos __attribute__((unused)))
113
113
{
114
114
  assert(0);
115
115
  return(0);
116
116
}
117
117
 
118
118
 
119
 
void ha_blackhole::position(const uchar *record __attribute__((__unused__)))
 
119
void ha_blackhole::position(const uchar *record __attribute__((unused)))
120
120
{
121
121
  assert(0);
122
122
  return;
125
125
 
126
126
int ha_blackhole::info(uint flag)
127
127
{
128
 
  bzero((char*) &stats, sizeof(stats));
 
128
  memset((char*) &stats, 0, sizeof(stats));
129
129
  if (flag & HA_STATUS_AUTO)
130
130
    stats.auto_increment_value= 1;
131
131
  return(0);
132
132
}
133
133
 
134
 
int ha_blackhole::external_lock(THD *thd __attribute__((__unused__)),
135
 
                                int lock_type __attribute__((__unused__)))
 
134
int ha_blackhole::external_lock(THD *thd __attribute__((unused)),
 
135
                                int lock_type __attribute__((unused)))
136
136
{
137
137
  return(0);
138
138
}
174
174
}
175
175
 
176
176
 
177
 
int ha_blackhole::index_read_map(uchar * buf __attribute__((__unused__)),
178
 
                                 const uchar * key __attribute__((__unused__)),
179
 
                                 key_part_map keypart_map  __attribute__((__unused__)),
180
 
                                 enum ha_rkey_function find_flag __attribute__((__unused__)))
181
 
{
182
 
  return(HA_ERR_END_OF_FILE);
183
 
}
184
 
 
185
 
 
186
 
int ha_blackhole::index_read_idx_map(uchar * buf __attribute__((__unused__)),
187
 
                                     uint idx __attribute__((__unused__)),
188
 
                                     const uchar * key __attribute__((__unused__)),
189
 
                                     key_part_map keypart_map __attribute__((__unused__)),
190
 
                                     enum ha_rkey_function find_flag __attribute__((__unused__)))
191
 
{
192
 
  return(HA_ERR_END_OF_FILE);
193
 
}
194
 
 
195
 
 
196
 
int ha_blackhole::index_read_last_map(uchar * buf __attribute__((__unused__)),
197
 
                                      const uchar * key __attribute__((__unused__)),
198
 
                                      key_part_map keypart_map __attribute__((__unused__)))
199
 
{
200
 
  return(HA_ERR_END_OF_FILE);
201
 
}
202
 
 
203
 
 
204
 
int ha_blackhole::index_next(uchar * buf __attribute__((__unused__)))
205
 
{
206
 
  return(HA_ERR_END_OF_FILE);
207
 
}
208
 
 
209
 
 
210
 
int ha_blackhole::index_prev(uchar * buf __attribute__((__unused__)))
211
 
{
212
 
  return(HA_ERR_END_OF_FILE);
213
 
}
214
 
 
215
 
 
216
 
int ha_blackhole::index_first(uchar * buf __attribute__((__unused__)))
217
 
{
218
 
  return(HA_ERR_END_OF_FILE);
219
 
}
220
 
 
221
 
 
222
 
int ha_blackhole::index_last(uchar * buf __attribute__((__unused__)))
 
177
int ha_blackhole::index_read_map(uchar * buf __attribute__((unused)),
 
178
                                 const uchar * key __attribute__((unused)),
 
179
                                 key_part_map keypart_map  __attribute__((unused)),
 
180
                                 enum ha_rkey_function find_flag __attribute__((unused)))
 
181
{
 
182
  return(HA_ERR_END_OF_FILE);
 
183
}
 
184
 
 
185
 
 
186
int ha_blackhole::index_read_idx_map(uchar * buf __attribute__((unused)),
 
187
                                     uint idx __attribute__((unused)),
 
188
                                     const uchar * key __attribute__((unused)),
 
189
                                     key_part_map keypart_map __attribute__((unused)),
 
190
                                     enum ha_rkey_function find_flag __attribute__((unused)))
 
191
{
 
192
  return(HA_ERR_END_OF_FILE);
 
193
}
 
194
 
 
195
 
 
196
int ha_blackhole::index_read_last_map(uchar * buf __attribute__((unused)),
 
197
                                      const uchar * key __attribute__((unused)),
 
198
                                      key_part_map keypart_map __attribute__((unused)))
 
199
{
 
200
  return(HA_ERR_END_OF_FILE);
 
201
}
 
202
 
 
203
 
 
204
int ha_blackhole::index_next(uchar * buf __attribute__((unused)))
 
205
{
 
206
  return(HA_ERR_END_OF_FILE);
 
207
}
 
208
 
 
209
 
 
210
int ha_blackhole::index_prev(uchar * buf __attribute__((unused)))
 
211
{
 
212
  return(HA_ERR_END_OF_FILE);
 
213
}
 
214
 
 
215
 
 
216
int ha_blackhole::index_first(uchar * buf __attribute__((unused)))
 
217
{
 
218
  return(HA_ERR_END_OF_FILE);
 
219
}
 
220
 
 
221
 
 
222
int ha_blackhole::index_last(uchar * buf __attribute__((unused)))
223
223
{
224
224
  return(HA_ERR_END_OF_FILE);
225
225
}
298
298
  return 0;
299
299
}
300
300
 
301
 
static int blackhole_fini(void *p __attribute__((__unused__)))
 
301
static int blackhole_fini(void *p __attribute__((unused)))
302
302
{
303
303
  hash_free(&blackhole_open_tables);
304
304
  pthread_mutex_destroy(&blackhole_mutex);