~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/blackhole/ha_blackhole.cc

  • Committer: Brian Aker
  • Date: 2008-12-05 07:03:50 UTC
  • Revision ID: brian@tangent.org-20081205070350-gvef0krbqgx3kv08
More solaris bits

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
          HA_READ_ORDER | HA_KEYREAD_ONLY);
63
63
}
64
64
 
65
 
int ha_blackhole::open(const char *name, int mode __attribute__((unused)),
66
 
                       uint32_t test_if_locked __attribute__((unused)))
 
65
int ha_blackhole::open(const char *name, int, uint32_t)
67
66
{
68
67
  if (!(share= get_share(name)))
69
68
    return(HA_ERR_OUT_OF_MEM);
78
77
  return(0);
79
78
}
80
79
 
81
 
int ha_blackhole::create(const char *name __attribute__((unused)),
82
 
                         Table *table_arg __attribute__((unused)),
83
 
                         HA_CREATE_INFO *create_info __attribute__((unused)))
 
80
int ha_blackhole::create(const char *, Table *, HA_CREATE_INFO *)
84
81
{
85
82
  return(0);
86
83
}
87
84
 
88
 
const char *ha_blackhole::index_type(uint32_t key_number __attribute__((unused)))
 
85
const char *ha_blackhole::index_type(uint32_t)
89
86
{
90
87
  return("BTREE");
91
88
}
92
89
 
93
 
int ha_blackhole::write_row(unsigned char * buf __attribute__((unused)))
 
90
int ha_blackhole::write_row(unsigned char *)
94
91
{
95
92
  return(table->next_number_field ? update_auto_increment() : 0);
96
93
}
97
94
 
98
 
int ha_blackhole::rnd_init(bool scan __attribute__((unused)))
 
95
int ha_blackhole::rnd_init(bool)
99
96
{
100
97
  return(0);
101
98
}
102
99
 
103
100
 
104
 
int ha_blackhole::rnd_next(unsigned char *buf __attribute__((unused)))
 
101
int ha_blackhole::rnd_next(unsigned char *)
105
102
{
106
103
  return(HA_ERR_END_OF_FILE);
107
104
}
108
105
 
109
106
 
110
 
int ha_blackhole::rnd_pos(unsigned char * buf __attribute__((unused)),
111
 
                          unsigned char *pos __attribute__((unused)))
 
107
int ha_blackhole::rnd_pos(unsigned char *, unsigned char *)
112
108
{
113
109
  assert(0);
114
110
  return(0);
115
111
}
116
112
 
117
113
 
118
 
void ha_blackhole::position(const unsigned char *record __attribute__((unused)))
 
114
void ha_blackhole::position(const unsigned char *)
119
115
{
120
116
  assert(0);
121
117
  return;
130
126
  return(0);
131
127
}
132
128
 
133
 
int ha_blackhole::external_lock(Session *session __attribute__((unused)),
134
 
                                int lock_type __attribute__((unused)))
 
129
int ha_blackhole::external_lock(Session *, int)
135
130
{
136
131
  return(0);
137
132
}
173
168
}
174
169
 
175
170
 
176
 
int ha_blackhole::index_read_map(unsigned char * buf __attribute__((unused)),
177
 
                                 const unsigned char * key __attribute__((unused)),
178
 
                                 key_part_map keypart_map  __attribute__((unused)),
179
 
                                 enum ha_rkey_function find_flag __attribute__((unused)))
180
 
{
181
 
  return(HA_ERR_END_OF_FILE);
182
 
}
183
 
 
184
 
 
185
 
int ha_blackhole::index_read_idx_map(unsigned char * buf __attribute__((unused)),
186
 
                                     uint32_t idx __attribute__((unused)),
187
 
                                     const unsigned char * key __attribute__((unused)),
188
 
                                     key_part_map keypart_map __attribute__((unused)),
189
 
                                     enum ha_rkey_function find_flag __attribute__((unused)))
190
 
{
191
 
  return(HA_ERR_END_OF_FILE);
192
 
}
193
 
 
194
 
 
195
 
int ha_blackhole::index_read_last_map(unsigned char * buf __attribute__((unused)),
196
 
                                      const unsigned char * key __attribute__((unused)),
197
 
                                      key_part_map keypart_map __attribute__((unused)))
198
 
{
199
 
  return(HA_ERR_END_OF_FILE);
200
 
}
201
 
 
202
 
 
203
 
int ha_blackhole::index_next(unsigned char * buf __attribute__((unused)))
204
 
{
205
 
  return(HA_ERR_END_OF_FILE);
206
 
}
207
 
 
208
 
 
209
 
int ha_blackhole::index_prev(unsigned char * buf __attribute__((unused)))
210
 
{
211
 
  return(HA_ERR_END_OF_FILE);
212
 
}
213
 
 
214
 
 
215
 
int ha_blackhole::index_first(unsigned char * buf __attribute__((unused)))
216
 
{
217
 
  return(HA_ERR_END_OF_FILE);
218
 
}
219
 
 
220
 
 
221
 
int ha_blackhole::index_last(unsigned char * buf __attribute__((unused)))
 
171
int ha_blackhole::index_read_map(unsigned char *, const unsigned char *,
 
172
                                 key_part_map, enum ha_rkey_function)
 
173
{
 
174
  return(HA_ERR_END_OF_FILE);
 
175
}
 
176
 
 
177
 
 
178
int ha_blackhole::index_read_idx_map(unsigned char *, uint32_t, const unsigned char *, 
 
179
                                     key_part_map, enum ha_rkey_function)
 
180
{
 
181
  return(HA_ERR_END_OF_FILE);
 
182
}
 
183
 
 
184
 
 
185
int ha_blackhole::index_read_last_map(unsigned char *, const unsigned char *, key_part_map)
 
186
{
 
187
  return(HA_ERR_END_OF_FILE);
 
188
}
 
189
 
 
190
 
 
191
int ha_blackhole::index_next(unsigned char *)
 
192
{
 
193
  return(HA_ERR_END_OF_FILE);
 
194
}
 
195
 
 
196
 
 
197
int ha_blackhole::index_prev(unsigned char *)
 
198
{
 
199
  return(HA_ERR_END_OF_FILE);
 
200
}
 
201
 
 
202
 
 
203
int ha_blackhole::index_first(unsigned char *)
 
204
{
 
205
  return(HA_ERR_END_OF_FILE);
 
206
}
 
207
 
 
208
 
 
209
int ha_blackhole::index_last(unsigned char *)
222
210
{
223
211
  return(HA_ERR_END_OF_FILE);
224
212
}
273
261
  free((unsigned char*) share);
274
262
}
275
263
 
276
 
static unsigned char* blackhole_get_key(st_blackhole_share *share, size_t *length,
277
 
                                bool not_used __attribute__((unused)))
 
264
static unsigned char* blackhole_get_key(st_blackhole_share *share, size_t *length, bool)
278
265
{
279
266
  *length= share->table_name_length;
280
267
  return (unsigned char*) share->table_name;
296
283
  return 0;
297
284
}
298
285
 
299
 
static int blackhole_fini(void *p __attribute__((unused)))
 
286
static int blackhole_fini(void *)
300
287
{
301
288
  hash_free(&blackhole_open_tables);
302
289
  pthread_mutex_destroy(&blackhole_mutex);